Returns the first error message. An exception can have two error messages.
1 error.message
<error.message />
Returns | |
---|---|
Type | Description |
String | First error message. |
Example
Copy
<xsql-script> <body> <try> <body> <!-- A exception on the database engine can occur (description column does not exist) --> <insert table='cdiarios'> <column name='descri'>test</column> </insert> </body> <catch> <println>Error at line: <error.line/></println> <println>.......in tag: <error.tag/></println> <println>........cause: <error.message/></println> </catch> </try> </body> </xsql-script>
Devuelve:
Copy
Error at line: 7 .......in tag: insert ........cause: java.sql.SQLException: Column (descri) not found in any table in the query (or SLV is undefined)., Column (descri) not found in any table in the query (or SLV is undefined).