Advertisement

"Null pointer access" putting object type in exception info

Started by April 01, 2015 06:20 PM
1 comment, last by Jason Goepel 9 years, 7 months ago

In an effort to provide more helpful error messages to my script writers, I have been looking for a way to make "null pointer access" a little more descriptive. Most of my script writers are technical people, but their programming training is very thin. "Null pointer access" pretty much doesn't mean anything to them. I am hoping to provide something like "Instance of CDemoClass has not been properly initialized" or something, potentially varying based on the object.

I don't have a good way of accomplishing this within the Exception callback framework, short of analyzing the line where an exception occurred. I have been considering adding object information, when it exists, to the context (something like m_exceptionObjectType) which could be read during the exception callback.

I know there are many instances where the object type is not readily available (like asBC_CHKREF), so I was wondering if you had any thoughts about this.

Thanks

I'll have to think about this one.

It's a valid suggestion, but I don't immediately see a solution for it.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

I'm going to try and hack something together. My immediate purpose may be satisfied by adding more exception information when the exception is set within "CallSystemFunction." I'll let you know if I come up with anything clever.

This topic is closed to new replies.

Advertisement