``` function thisThrowsAnError() { throw nlapiCr...
# suitescript
e
Copy code
function thisThrowsAnError() {
  throw nlapiCreateError("testing");
}

function go() {
  try {
    thisThrowsAnError();
  } catch(e) {
    console.log(e.getStackTrace());
  }
}

go()
prints:
Copy code
stacktrace: function nlobjError(c,a,b)arguments: {'testing','undefined','undefined'}

function nlapiCreateError(c,a,b)arguments: {'testing'}

function thisThrowsAnError() arguments: {}

function go() arguments: {}