Hi all.
There is an example:
How it works? Why am I getting the error after updating x, and endkey if x wasnt updated?
It's a problem when i try to do something like this:
Thanks.
There is an example:
Code:
run p2.
catch e as Progress.Lang.AppError:
message e:ReturnValue view-as alert-box.
end catch.
procedure p2:
def var x as int.
def var c-tmp as char.
_tr:
do on error undo, return error 'Error'
on endkey undo, return error 'Endkey'
:
display 'eneky' @ c-tmp.
update x. /* press go or endkey */
display 'now error' @ c-tmp.
update x. /* press endkey */
end.
end procedure.
How it works? Why am I getting the error after updating x, and endkey if x wasnt updated?
It's a problem when i try to do something like this:
Code:
/* CLASS cancelerror INHERITS Progress.Lang.AppError: */
do trans on error undo, leave:
run p2.
catch ce as cancelerror:
end catch.
catch e as Progress.Lang.AppError:
message e:ReturnValue view-as alert-box title 'ERROR!'.
end catch.
end.
procedure p2:
do
on enkey undo, return error new cancelerror(): /* Error to undo external transaction, but dont show any message to user */
on error undo, return error: /* */
update x.
update y.
/* do some stuff ... */
catch e as Progress.Lang.Error:
return error e. /* Error that i want to user see /
end catch.
end.
end procedure.
Thanks.
Last edited by a moderator: