//============ // pxStatus //============ ;Wanneer IsOK=1 en Message="" dan hoeft geen object te worden aangemaakt en is leeg teruggeven ook in orde ;#Define pxStatusOK ##class(BL.Sys.Proxy.pxStatus).Create(1) #Define pxStatusOK "" #Define pxStatusOKAndMsg(%msg) ##class(BL.Sys.Proxy.pxStatus).Create(1,%msg) #Define pxStatusError(%msg) ##class(BL.Sys.Proxy.pxStatus).Create(0,%msg) #Define pxStatusErrorEx(%msg,%intmsg) ##class(BL.Sys.Proxy.pxStatus).Create(0,%msg,,%intmsg) #Define pxCacheStatus(%cs) $S($$$ISOK(%cs):$$$pxStatusOK,1:$$$pxStatusError($$ParseStatus^vhLib(%cs))) #Define pxCacheStatusEx(%cs,%msg) $S($$$ISOK(%cs):$$$pxStatusOK,1:$$$pxStatusErrorEx(%msg,$$ParseStatus^vhLib(%cs))) //SmartStatus stuurt ook specifieke info terug in het data veld #Define pxSmartStatusOK(%data) ##class(BL.Sys.Proxy.pxStatus).Create(1,,%data) #Define pxSmartStatusOKAndMsg(%msg,%data) ##class(BL.Sys.Proxy.pxStatus).Create(1,%msg,%data) #Define pxSmartStatusError(%msg,%data) ##class(BL.Sys.Proxy.pxStatus).Create(0,%msg,%data) #Define pxSmartStatusErrorEx(%msg,%intmsg,%data) ##class(BL.Sys.Proxy.pxStatus).Create(0,%msg,%data,%intmsg) #Define pxSmartCacheStatus(%cs,%data) $S($$$ISOK(%cs):$$$pxSmartStatusOK(%data),1:$$$pxStatusError($$ParseStatus^vhLib(%cs))) #Define pxSmartCacheStatusEx(%cs,%msg,%data) $S($$$ISOK(%cs):$$$pxSmartStatusOK(%data),1:$$$pxStatusErrorEx(%msg,$$ParseStatus^vhLib(%cs))) #Define pxStatusIsOK(%pxstatus) ((%pxstatus="") || (%pxstatus.IsOK'=0)) #Define pxStatusIsERR(%pxstatus) ((%pxstatus'="") && (%pxstatus.IsOK=0)) //DEBUG #Define WriteAndQuitOnError(%ok) If $$$pxStatusIsERR(%ok) W "ERROR: "_%ok.FullMsg(),! Quit