Why is error handling sometimes so restricted?

I’m trying to inform the user of specific errors when saving prefs, but whatever I do I can’t do anyhing other than just try catch the error and then log it or show the complete error in a popup. Any attempt at things like e.getMessage() or trying to access a property alle give me security errors like:

java.lang.SecurityException: Invoking methods on class physicalgraph.exception.ConflictException is not allowed: contains @line 413 (doCall)

The http handlers have much more options, is this on purpose?