• Advertisement
Sign in to follow this  

"Null pointer access" putting object type in exception info

This topic is 1025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement