Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
catch SQL error
Migrateduser
<p>Hi all,</p><p> </p><p>I would like to know if there is any way to apply an error catch mechanism for SQL when working with postgresql.</p><p> </p><p>For now when I get an error message I see this section in the bottom of my report:</p><pre class="_prettyXprint _lang-">The following items have errors:Table (id = 7482):+ Cannot get the result set metadata. org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.SQL error #1:ERROR: syntax error at or near "SEsLECT" Position: 2 ; org.postgresql.util.PSQLException: ERROR: syntax error at or near "SEsLECT" Position: 2</pre><p>where table ( ID = 7482 ), is the table that uses the Data-set with the SQL error</p><p> </p><p><strong>Note: I know what is my SQL error in this case, I created it so I will have an example</strong></p><p> </p><p>what I would like to achieve is replace this message with my own, something like:</p><p>"There was an error please contact our support team, Have a great day"</p><p> </p><p>in other part of the report I used the following logic:</p><pre class="_prettyXprint _lang-">try{ CODE}catch (e){ displayErrorServerSide(e);} </pre><p>this uses the JavaScript TRY and CATCH mechanism in order to print all my errors to a log file, but I can't use it in this case because I'm not running the Data-set (Birt does)</p><p> </p><p>Hope that my problem is clear</p><p>Waiting for a reply</p><p>Have a great day</p><p>Shlomi</p><p> </p>
Find more posts tagged with
Comments
There are no comments yet