• Advertisement
Sign in to follow this  

More info on null ref exception

This topic is 408 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

It would be nice to get some more info in a null ref exception message. For example, take this code:

m_grid.m_netricsa.m_wPerkInfo.m_visible = false;

If we got a null ref exception here and all m_* members are handles, how do we know which one is null? Could Angelscript say something like "m_wPerkInfo is null"?

Also, when we're on the topic of null references, what about the null conditional operator "?." ? Would that be something that could be implemented?

Share this post


Link to post
Share on other sites
Advertisement

Null conditional operator? It's the first time I've heard this term. In what programming language is that available? It sounds interesting and may be something that can be implemented.

 

About adding more information on the exception. I'll look into it, but it may not be that easy, and would probably require extensive changes just to carry the information to the VM so it would have the information available at the time of raising the exception. I'm not too sure it would be worth it.

Share this post


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

  • Advertisement