Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
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