Focal Point
FOCERRNUM

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4781021962

January 31, 2008, 01:47 PM
om-cgi-bell
FOCERRNUM
Good day,

I have managed to peform error handling in our application using the good old code here:

-IF &FOCERRNUM NE 0 GOTO FATAL;

Furthermore, I am able to get the 'generic' error description: FEXERR(&FOCERRNUM,'A72');

IS there a way (or a variable) similar to FOCERRNUM that will give me the Error description and NOT the general one from FEXERR.

For example:
FOCERRNUM: 205
FEXERR: (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED:

FOCERRDESC: (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: LOST_MASTER_FILE

To summarize, I am trying to Capture the Error description "as the error occurs", the same way we can capture the error number using FOCERRNUM.


WebFOCUS 52 and 53
Test: WebFOCUS 764
Unix
Output: Excel, HTML, Text, PDF
January 31, 2008, 04:01 PM
Francis Mariani
I haven't found a way yet.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 01, 2008, 05:43 AM
nubi
I'd like to know this as whenever i get an error i have to rerun using this:

? (errornumber)

ie:

? 205

to get a full description:

0(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED:
No data description can be found for the file requested. Check the
Master File Descriptions allocated or available, or the spelling of
the file name. If you are in Screen Painter, type IGNore to
continue, or any other input to return to TED.

so the ability to code this into the -IF &FOCERRNUM NE 0 GOTO ERROR; would be good if purely for effiency reasons...

im quite new to WF so haven't really played with the -IF &FOCERRNUM NE 0 GOTO ERROR; command just use dthe existing code our developers use for error trapping.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 01, 2008, 09:18 AM
jgelona
Have you tried this?

-IF &FOCERRNUM NE 0 GOTO FATAL;
.
.
.
-FATAL
-SET &ERRNUM=&FOCERRNUM;
? &ERRNUM
-RUN
.
.
.



In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
February 04, 2008, 01:51 PM
om-cgi-bell
jgelona,

The outcome of the code you suggested is similar to the outcome of:

FEXERR(&FOCERRNUM,'A72');

Though this is an excellent way to acquire more information about a particular error, it does not answer my original question:

How to capture an error description "as it occurs" similar to how we capture the Error number using FOCERRNUM. Perhaps another variable called FOCERRDESC.


WebFOCUS 52 and 53
Test: WebFOCUS 764
Unix
Output: Excel, HTML, Text, PDF
February 04, 2008, 02:34 PM
susannah
-SET &FOCERRDESC=FEXERR(&FOCERRNUM,'A72');
-TYPE &FOCERRDESC
or write it to a file .
or write it to the heading of a report and email it... or...whatever you need.
It seems to me you've answered your own question.
What am i missing?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 04, 2008, 03:04 PM
mgrackin
Susannah,

The difference is that specific information is missing. The example given at the beginning of the post is a good example. The WebFOCUS generic error msg simply states an MFD was not found but a more specific error msg would also include the name on the MFD which was not found at the time a read was attempted.

Another example would be to get an error msg that says FIELDNAME NOT RECOGNIZED vesus FIELDNAME NOT RECOGNIZED: THEFIELDNAME.

See the difference?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
February 04, 2008, 03:34 PM
susannah
oh yeah, i see.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 05, 2008, 07:23 AM
GamP
The only time the specific information you're looking for is available, is when the error occurs. No sooner,no later.
There is only one place where this error message will be recorded, apart from sysout, and you will have to enable it to get it there: the server traces.
Now the good thing about traces is that you can hev them generated on demand and have them written to a file of your choice.
Possible scenario to get what you want:
1. start fex
2. within the fex turn on server tracing.
3. If an error occurs, you can trap it with &focerrnum.
4. disable traces
5. Table the trace file, looking for a line that contains your error message number.
This, to my knowledge, is the only, albeit somewhat farfetched, way of getting the error specifics.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988