<div dir="ltr">I write a lot of my own custom functions in NCL. I always put in various checks that will print an error message and exit. But when I encounter this, I never know which line is causing the problem.<div><br></div><div>For example, I might have a block of code like:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">...</font></div><div><font face="monospace, monospace">09</font></div><div><font face="monospace, monospace">10  y = some_function (x)</font></div><div><font face="monospace, monospace">11</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">12  a = some_function (b)</font></div><div><font face="monospace, monospace">13  </font></div><div><font face="monospace, monospace">...</font></div></blockquote></div><div><br></div><div>and when I run the script I get something like:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">ERROR: &quot;some_function&quot; doesn&#39;t like your input!</font></div></blockquote></div><div><br></div><div>But I would like more information, like a typical NCL error message:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">fatal:Execute: Error occurred at or near line 3 in file ...</font><br></div></blockquote></div><div><br></div><div>So, how can I get NCL to throw an error that will mention the line where the function was called?</div><div><br></div><div>Thanks,</div><div>Walter</div></div>