Going beyond script debugging

Exceptions are even in the very core of Mufasa. This greatly improves debugging in general, as we will also be able to easily spot errors in Mufasa. When they occured, what the values of the variables were, et cetera.

Let's look at a function known as ReturnData(), which returns the client data. It for example checks if the points that are passed are consistent. If they are not, an Exception is thrown. If Mufasa does not catch that particular Exception2.1, then it will be thrown in your script. This will indicate that somehow ReturnData got invalid coordinates. Usually this Exception is not throw, as other functions also check their input for sanity, and then it is possible to throw a more detailed exception.



Merlijn Wajer 2010-08-27