Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8620

Re: throw runtimeexception

$
0
0

I'm not sure I would this standard practice.  What I tend to do is:

 

1.  Create a exception from throwable

2.  Actually instantiate the exception

3.  If I want to include script information I call PopulateError and then pull the information off the error object just before I throw the exception.

 

If you take a look at Power Building with Exceptions, the author there takes a user object inherited from the throwable class and a global function and puts something together that you can call in a single line when you want to raise an exception.


Viewing all articles
Browse latest Browse all 8620

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>