While debugging, I would check the Execution Log on NetSuite.
I uses log.debug('title', 'message') format to show log.
Can the line number which the error happens be also logged?
Thus we can easily know where the error is. Thanks.
While debugging, I would check the Execution Log on NetSuite.
I uses log.debug('title', 'message') format to show log.
Can the line number which the error happens be also logged?
Thus we can easily know where the error is. Thanks.
NetSuite Error object contains stack property which can be used to get stack trace.
eg.
try {
throw error.create({ name: 'ERROR', message: 'ERROR_MESSAGE' });
} catch (ex) {
log.debug({ title: 'Error Stack', details: ex.stack });
}