Article
· Jul 18, 2024 1m read

How to put application logs into the global ^ERRORS

InterSystems FAQ rubric

This can be done with TRY-CATCH:

 #dim ex As %Exception.AbstractException
 TRY {
    //Code that causes an error
  }
  CATCH ex {
     do ex.Log()
  }

If you use ^%ETN, call it from the BACK entry (BACK^%ETN).

Please also take a look at the related article: How to get application errors (^ERRORS) using a command

Discussion (0)0
Log in or sign up to continue