[MCOL-1199] Forward Bulk Write API C++ Exceptions to Java Created: 2018-02-05 Updated: 2023-10-26 Resolved: 2018-02-07 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | 1.1.3 |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Jens Röwekamp (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2018-03 |
| Description |
|
Occurring C++ exceptions aren't forwarded to Java. Therefore, in case a C++ exception is thrown, the Java program terminates. |
| Comments |
| Comment by Jens Röwekamp (Inactive) [ 2018-02-05 ] |
|
Created a subclass of java.lang.RuntimeException called ColumnStoreException to which a C++ ColumnStoreError is forwarded to. Added the related glue code in javamcsapi.i. Added a simple test to the test suite that tries to access a nonexistent table and therefore throws a ColumnStoreException. Exceptions of type java.lang.RuntimeException are unchecked. If we need to use checked Exceptions we have to specify each C++ function where a ColumnStoreError is thrown. Haven't found an easy way to do this automated with Swig. Therefore, I chose java.lang.RuntimeException. What do you think? |
| Comment by Andrew Hutchings (Inactive) [ 2018-02-05 ] |
|
Looks good to me. If we figure out a better way later we can change it. For QA: There is a test in the API's test suite for this. |
| Comment by Daniel Lee (Inactive) [ 2018-02-07 ] |
|
Build verified: Github source |