How do you guys handle errors ?

Monkey Forums/Monkey Programming/How do you guys handle errors ?

Rushino(Posted 2013) [#1]
Hey guys,

Just a question.. how do you guys usually handle errors ? Do you make use of the Error(...) function or use an Exception from Throwable interface ?

If its for checking the lenght of a string as an example ?

Thanks!


DGuy(Posted 2013) [#2]
Because I mostly code procedurally (coming from a C/BASIC programming background) I use return codes to indicate success/failure rather than throw exceptions.

I only use Error during development when dealing with invalid developer generated content: The content is tested for validity at the point of entry into the program and if invalid then Error.