Problem catching an error

Posted by goo on 27-Apr-2018 04:06

11.7

Trying to do a write-data-element 

vLog = hSAXWriter:WRITE-DATA-ELEMENT("OrderNo", TRIM(STRING(100 + FaktHode.Klientnr)) + TRIM(STRING(FaktHode.Ordrenr,"999999"))).

:

:

There is a lot of this writes, and I would like to find which of them that gives the error:

-- **The WRITE-DATA-ELEMENT attribute on the SAX-WRITER widget has invalid arguments. (4065)

I have tried to add a CATCH eError ......, but it does not hit that catch. I beleve there is something I do wrong trying to catch it, but what?

//Geir Otto

Posted by goo on 27-Apr-2018 04:11

All Replies

Posted by goo on 27-Apr-2018 04:11
Posted by goo on 27-Apr-2018 04:33
Posted by Laura Stern on 11-Jun-2018 08:14

Well, there may be a knowledge base on it.  But that doesn't explain it.  This is a bug in my opinion.  A CATCH block for Progress.Lang.Error should catch the error.  Many handle methods do generate warnings (not errors), but when using structured error handling that should not happen.  Any error that generates an error message should get caught.  

If you just want to know which line is causing the error, turn on debug-alert (-debugalert or SESSION:DEBUG-ALERT = yes).  When the error comes up, click on the Help button to see the stack trace.

Posted by Laura Stern on 26-Feb-2019 14:31

I know this was posted 10 months ago, but I want to amend my statement, which was:

A CATCH block for Progress.Lang.Error should catch the error.  Many handle methods do generate warnings (not errors), but when using structured error handling that should not happen.  Any error that generates an error message should get caught.  

This statement is true UNLESS, the error message itself is explicitly marked as a warning in our message database.  And that is the case with this 4065 message.

Posted by gus bjorklund on 26-Feb-2019 15:02

but 4065 "widget has invalid arguments" is obviously an ERROR.

Posted by Laura Stern on 26-Feb-2019 16:10

Yes, I would agree.  But then the bug is not that it doesn't get caught, but that it should not be marked as a warning.  So a bug could be logged for that.

Posted by gus bjorklund on 26-Feb-2019 17:04

agree

This thread is closed