Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Handle Multiple Java Exceptions using single catch OR multiple catch.
- <try>
- <datasource name="SnapshotDataSource" url="jdbc:hsqldb:hsql://localhost:9001" username="sa" password="" />
- <sql name="SnapshotDataSource" query="select * from titles" outputvariable="result" />
- </try>
- <catch type = "SQLException | ConnectException e">
- <display message="exception message = " expr="$e.message" />
- <!-- rethrow exception -->
- <abort outputvariable="result">
- <myerror>
- <message>Application Custom Error Message : {$e.message} </message>
- </myerror>
- </abort>
- </catch>
- <!-- Abort statement used throwing Application Exceptions -->
Add Comment
Please, Sign In to add comment