Skip to content

Commit e0462b0

Browse files
committed
git subrepo pull (merge) uno
subrepo: subdir: "uno" merged: "70309ec" upstream: origin: "https://github.com/prrvchr/uno.git" branch: "main" commit: "c78d66c" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
1 parent daaddf6 commit e0462b0

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

uno/.gitrepo

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[subrepo]
77
remote = https://github.com/prrvchr/uno.git
88
branch = main
9-
commit = cc2e4df5937d42ddb0ead746bf717c04842a51a4
9+
commit = c78d66c312c9eda89004b4c73d15db42539910fe
1010
parent = 97f32810cd78f580a2f3498ff27c564246037184
1111
method = merge
1212
cmdver = 0.4.3

uno/lib/java/helper/UnoHelper.java

+20-10
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import com.sun.star.resource.XStringResourceResolver;
3333
import com.sun.star.sdbc.SQLException;
3434
import com.sun.star.sdbc.XRow;
35-
import com.sun.star.uno.Any;
3635
import com.sun.star.uno.AnyConverter;
3736
import com.sun.star.uno.Exception;
3837
import com.sun.star.uno.RuntimeException;
@@ -366,19 +365,19 @@ public static WrappedTargetException getWrappedException(Exception e)
366365
return exception;
367366
}
368367

369-
public static java.sql.SQLException getSQLException(java.lang.Exception e)
368+
public static java.sql.SQLException getSQLException(java.lang.Throwable e)
370369
{
371-
return new java.sql.SQLException(e.getMessage(), e);
370+
return new java.sql.SQLException(e.getLocalizedMessage(), e);
372371
}
373372

374373
public static SQLException getSQLException(java.sql.SQLException e)
375374
{
376-
return new SQLException(e.getMessage());
375+
return getUnoSQLException(e.getLocalizedMessage());
377376
}
378377

379378
public static SQLException getSQLException(Exception e, XInterface component)
380379
{
381-
SQLException exception = new SQLException(e.getMessage());
380+
SQLException exception = getUnoSQLException(e.getMessage());
382381
exception.Context = component;
383382
return exception;
384383
}
@@ -387,25 +386,36 @@ public static SQLException getSQLException(java.sql.SQLException e, XInterface c
387386
{
388387
SQLException exception = null;
389388
if (e != null) {
390-
exception = new SQLException(e.getMessage());
389+
exception = getUnoSQLException(e.getLocalizedMessage());
391390
exception.Context = component;
392-
exception.SQLState = e.getSQLState();
391+
String state = e.getSQLState();
392+
if (state != null) {
393+
exception.SQLState = state;
394+
}
393395
exception.ErrorCode = e.getErrorCode();
394396
SQLException ex = getNextSQLException(e.getNextException(), component);
395-
exception.NextException = (ex == null) ? Any.VOID : ex;
397+
if (ex != null) {
398+
exception.NextException = ex;
399+
}
396400
}
397401
return exception;
398402
}
399403

404+
private static SQLException getUnoSQLException(String msg)
405+
{
406+
return msg != null ? new SQLException(msg) : new SQLException();
407+
}
408+
400409
public static SQLException getSQLException(java.lang.Exception e,
401410
XInterface component)
402411
{
403-
SQLException exception = new SQLException(e.getMessage());
412+
SQLException exception = getUnoSQLException(e.getMessage());
404413
exception.Context = component;
405414
return exception;
406415
}
407416

408-
private static SQLException getNextSQLException(java.sql.SQLException e, XInterface component)
417+
private static SQLException getNextSQLException(java.sql.SQLException e,
418+
XInterface component)
409419
{
410420
SQLException exception = null;
411421
if (e != null) {

0 commit comments

Comments
 (0)