your question is confusing. By definition, the cat...
# suitescript
b
your question is confusing. By definition, the catch block only runs if the try throws an error. You can't have a try block that throws no errors and a catch block that throws an error
n
The catch block caught the error but it does not send me the actual error I am thinking- instead it tells me "The author internal id or email must match an employee." in the body of the email sent to me. Both try and catch blocks has the nlapiSendEmail api with the same inactive employee as sender & myself as recipient of these emails.
b
are you sure its the nlapiSendEmail api thats sending the error and not the script error email
if you had the same code in the try and catch, both will throw errors and if uncaught, the error thrown from the catch will trigger the script error email
s
The email you are getting is likely the system generated email when an error is thrown. The nlapiSendEmail call is not putting the error into the email body.
n
Sorry, just saw this. I believe that both of you are correct - I just have to troubleshoot more and find what's wrong.