Guest User

Untitled

a guest
Oct 5th, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. // Handle Multiple Java Exceptions using single catch OR multiple catch.
  2. <try>
  3. <datasource name="SnapshotDataSource" url="jdbc:hsqldb:hsql://localhost:9001" username="sa" password="" />
  4. <sql name="SnapshotDataSource" query="select * from titles" outputvariable="result" />
  5. </try>
  6. <catch type = "SQLException | ConnectException e">
  7. <display message="exception message = " expr="$e.message" />
  8.  
  9. <!-- rethrow exception -->
  10. <abort outputvariable="result">
  11. <myerror>
  12. <message>Application Custom Error Message : {$e.message} </message>
  13. </myerror>
  14. </abort>
  15. </catch>
  16.  
  17. <!-- Abort statement used throwing Application Exceptions -->
Add Comment
Please, Sign In to add comment