Discussions
javascript newb: Custom exceptions or nlobjError
I'm revamping my error handling and want to throw (and subsequently catch) a detailed exception. I looked at the nlobjError object but I'm unclear how to throw it with the properties set?
the nl library has this:
function nlobjError( ) { ; }
nlobjError.prototype.getCode = function( ) { ; }
nlobjError.prototype.getDetails = function( ) { ; }
nlobjError.prototype.getStackTrace = function( ) { ; }
nlobjError.prototype.getUserEvent = function( ) { ; }
nlobjError.prototype.getInternalId = function( ) { ; }
I see the 'getters', but how do I SET the properties?
Additionally, if I wanted to create my own exception object with additional properties, can I inherit from the nlobjError object?
I'm sure to many of you this is easy stuff, but I've never had to do this and google hasn't turned up too much so far.
Steve Klett | Senior Developer
NetValue Technology