· Jun 20, 2018

[Intersystems 2017] Use the email alert request


I used the operation :  EnsLib.EMail.AlertOperation to send mail to handle error. However, I want to get more information about the error (session ID message, the date, the namespace... etc).

what is the best way to do it?

I tried to add informations in OnAlertRequest method as below but I need to change mail operation from all namespaces...

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

You can do it in three ways:

1 -

set ^mtemperro($ZNSPACE,..%PackageName()_"."_..%ClassName(),$horologmensagem_" Erro CACHE: "_$zerror_" - "_$SYSTEM.OBJ.DisplayError()

2 -
Throw ##class(%Exception.General).%New("Falha ao sinalizar o lançamento do PDA como rastreado.",1,..%ClassName()_".upByRastreado","Informe ao suporte sobre o problema.").Log()

3 - Declare in your class an exception variable

#dim exception As% Exception.AbstractException

catch exception {
     do exception.Log()

Then just check the cache administration portal:

System Operation-> System Logs-> Application Error Log