no-error problem

Posted by Marco Aurelio on 16-Aug-2017 11:37

Hi all,

   OpenEdge Release 11.6.3.016 chui

  suddenly no-error is not working. In the program below I was specting that the error should be displayed in the message command but error-status:error returns "no" and  ERROR-STATUS:GET-MESSAGE(1) returns "" and the error message is displayed in message área of chui or logs. this problem happens with a .p no-error too. even in webspeed, appserver and pasoe.

thanks,

/*program*/

def var i as i.

run teste no-error.

message error-status:error skip
         ERROR-STATUS:GET-MESSAGE(1)
         view-as alert-box.

procedure teste:

i = dec("x").

end procedure.

Posted by Fernando Souza on 16-Aug-2017 11:49

Errors from procedures are not propagated back the caller by default. You would have to either catch the error in the internal procedure and throw it back to the caller, or change the behavior for that .p by adding this to the top of your .p

ROUTINE-LEVEL ON ERROR UNDO,THROW.

This will cause the procedure (and its internal procedures) to propagate the error back to the caller.

All Replies

Posted by Fernando Souza on 16-Aug-2017 11:49

Errors from procedures are not propagated back the caller by default. You would have to either catch the error in the internal procedure and throw it back to the caller, or change the behavior for that .p by adding this to the top of your .p

ROUTINE-LEVEL ON ERROR UNDO,THROW.

This will cause the procedure (and its internal procedures) to propagate the error back to the caller.

This thread is closed