Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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