Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
FOCERRNUM
 Login/Join
 
Member
posted
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
 
Posts: 3 | Registered: January 28, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 285 | Location: UK | Registered: October 26, 2007Reply With QuoteReport This Post
Master
posted Hide Post
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.
 
Posts: 958 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 3 | Registered: January 28, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
-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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
oh yeah, i see.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.