cancel
Showing results for 
Search instead for 
Did you mean: 

error handling / exception handling

Former Member
0 Kudos

Does anyone know how error handling can be customized in Web Dynpro?

Currently they just mention three "standardized" messages that can be shown to the user: standard, warning and error. Also, they emphasize form validation instead of going into the guts of error handling.

Does anyone know how to log these errors, handle the stack trace, take different actions based on any errors (exceptions), etc.?

Thanks for your help!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Does anyone know how to

<i>log these errors,</i>

Answers provided on this thread

<i>... handle the stack trace,</i>

Please clarify

<i>... take different actions based on any errors (exceptions)</i>

More on the latest.

If exception is triggered by your code then it is rooted from some action handler. Therefore you may surround code inside action handler with try / catch blocks and behaves accordingly in action handler (for example, fire outbound plug to display error view). There is no standard hook in WD that is called on exception (but AFAIR you may customize standard error page for all WD applications while WD core is a regular J2EE web application itself)

Other types of error are validation errors. They occur before your code get executed. To get information how to manage this exceptions check SDN / WebAS / WebDynpro articles -- there are several articles on validating / non-validating action handlers)

VS

Former Member
0 Kudos

Valery,

By "handle the stack trace" I mean mostly write it out to the screen/log file etc.

Thanks.

former_member182372
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Tushar,

U can get some help from NDS webdynpro help regarding the log viewer tool, so go through this link, hope u have help in NDS..

http://127.0.0.1:1538/help/index.jsp?topic=/com.sap.devmanual.doc.user/30/6c64403899970ae10000000a15...

Regards,

Sirisha.R.S

Former Member
0 Kudos

PS. Your NWDS must be running for this URL to work...

Former Member
0 Kudos

> Hi Tushar,

>

> U can get some help from NDS webdynpro help regarding

> the log viewer tool, so go through this link, hope u

> have help in NDS..

>

> http://127.0.0.1:1538/help/index.jsp?topic=/com.sap.de

> vmanual.doc.user/30/6c64403899970ae10000000a155106/con

> tent.htm

>

> Regards,

> Sirisha.R.S

Sirisha:

I tried this link, after starting up the services in the SAP MMC. But I get "Page cannot be displayed". Maybe this port is not recognized. I have port 50000 as the standard port for j2ee applications. Can you please clarify this URL?

Thanks.

Former Member
0 Kudos

Hi Tushar

You have start NWDS which has a built in Apache that serves the request.

Regards

Pran

Former Member
0 Kudos

> Hi Tushar

> You have start NWDS which has a built in Apache that

> serves the request.

>

> Regards

> Pran

Hi Pran,

I am only aware of J2ee services on port 50000. Can you please explain how to start "NWDS".

Thanks.

Former Member
0 Kudos

Hi Tushar

Is the intention here only to log these messages with defined a severity. What are the other actions you are looking at.

Regards

Pran

Former Member
0 Kudos

> Hi Tushar

>

> Is the intention here only to log these messages with

> defined a severity. What are the other actions you

> are looking at.

>

> Regards

> Pran

Pran:

Specifically, I want to be able to use "try-catch" blocks and catch exceptions/errors, then show them to the user, or log them, or take corrective actions like use default values if the input was wrong, etc. or other best practices recommended by SAP.

Thanks.