Hi Thomas,

I propose to all the following information to JdbcSQLException:

   1. Name of the user defined function.
   2. SQL statement.
   3. May be the list of actual values, at least for primitive and
String types. It would simplify debugging in case of very complex Java
functions.

Currently all I get is this:

org.h2.jdbc.JdbcSQLException: Exception calling user-defined function
[90105-133]
...
Caused by: java.lang.IllegalArgumentException: bad function
...

Here is the test case:

    @Test
    public void callBad() throws Exception {

        Class.forName("org.h2.Driver");
        Connection connection =
DriverManager.getConnection("jdbc:h2:mem:");
        Statement stat = connection.createStatement();
        stat.execute("CREATE ALIAS bad FOR \"" +
                getClass().getName() + ".bad\"");
        ResultSet rs = stat.executeQuery(
                "select bad()");
    }

    public static double bad() {
        throw new IllegalArgumentException("bad function");
    }


Sincerely
Pavel

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to