This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in error page for DD

 
maya shukla
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Please clear following doubt...

I. while declaring multiple <exception-type> in DD do we need to take care for superclass-subclass relationship as we did in catch block...catching subclass exception first....or in any sequence we can define them in DD,and it will take care of more specific first ...

II. say for an Error code "ABC" exception type is "ABCException" then either we can define <error-code> or <exception-type> ..not both..plz confirm.

Thanks a lot....
 
Narendra Dhande
Ranch Hand
Posts: 951
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I don't think the sequence like try-catch block is required in DD.

About your second question, I do not understand the reletionship beetween the Error code and Exceptions. The Error codes are HTTp Response specific and Exceptions are Java specific. For Some uncaught Exceptions The Server May throws 500 (Internal Server Error) code.

I can define both in the DD.

Thanks
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

say for an Error code "ABC" exception type is "ABCException" then either we can define <error-code> or <exception-type> ..not both..plz confirm.


<error-code> should be numbers like 404(notFoundError)

<error-code>
404
</error-code>
 
maya shukla
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok,
From the above what i find is-

There is no mapping between error code(which is a number) and exception type..they are independent of each-other.

And we can define them in two different <error-page> tag.

Actually i got confused..with HDFS page 594 Bang box.

which says "you can not use <error-code> and <exception-type> togather!"

Thanks Narendra and Vishnu....
 
parra matta
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container will match the closest exception in java heirarchy and if not found a match, then it will look at the root cause and try match it again. Finally, it will try to match an error-code.
 
Frederic Esnault
Ranch Hand
Posts: 284
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What HFSJ means by "cannot use exception-type and error-code together" is that for one error-page block, you must have :
1. Either an exception-type or an error-code element
2. a location element pointing to the error page to use.

But you can define multiple error-page blocks in your DD
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic