Throwing exceptions

Started by Germán Hüttemann Arzaalmost 19 years ago2 messagesgeneral
Jump to latest
#1Germán Hüttemann Arza
ghuttemann@gmail.com

Hi,

I need a way to throw a message in a function, when an exception occurs, but I
don't want to write again and again the same message in every place I need to
throw it. So, is there a way to handle this situation in a more general
manner?

Thanks in advance,

--
Germán Hüttemann Arza
CNC - Centro Nacional de Computación
UNA - Universidad Nacional de Asunción
Campus Universitario, San Lorenzo - Paraguay
http://www.cnc.una.py - Tel.: +595 21 585550

#2Scott Marlowe
smarlowe@g2switchworks.com
In reply to: Germán Hüttemann Arza (#1)
Re: Throwing exceptions

Germ�n H�ttemann Arza wrote:

Hi,

I need a way to throw a message in a function, when an exception occurs, but I
don't want to write again and again the same message in every place I need to
throw it. So, is there a way to handle this situation in a more general
manner?

Why not create a table of error messages / numbers, then you can just
pull the message from the table?