|
4 | 4 | import org.utplsql.api.compatibility.CompatibilityProxy; |
5 | 5 | import org.utplsql.api.exception.DatabaseNotCompatibleException; |
6 | 6 | import org.utplsql.api.exception.SomeTestsFailedException; |
| 7 | +import org.utplsql.api.exception.UtPLSQLNotInstalledException; |
7 | 8 | import org.utplsql.api.reporter.DocumentationReporter; |
8 | 9 | import org.utplsql.api.reporter.Reporter; |
9 | 10 | import org.utplsql.api.testRunner.TestRunnerStatement; |
@@ -84,7 +85,7 @@ public TestRunner skipCompatibilityCheck( boolean skipCompatibilityCheck ) |
84 | 85 | return this; |
85 | 86 | } |
86 | 87 |
|
87 | | - public void run(Connection conn) throws SomeTestsFailedException, SQLException, DatabaseNotCompatibleException { |
| 88 | + public void run(Connection conn) throws SomeTestsFailedException, SQLException, DatabaseNotCompatibleException, UtPLSQLNotInstalledException { |
88 | 89 |
|
89 | 90 | CompatibilityProxy compatibilityProxy = new CompatibilityProxy(conn, options.skipCompatibilityCheck); |
90 | 91 |
|
@@ -113,7 +114,11 @@ public void run(Connection conn) throws SomeTestsFailedException, SQLException, |
113 | 114 | } catch (SQLException e) { |
114 | 115 | if (e.getErrorCode() == SomeTestsFailedException.ERROR_CODE) { |
115 | 116 | throw new SomeTestsFailedException(e.getMessage(), e); |
116 | | - } else { |
| 117 | + } |
| 118 | + else if (e.getErrorCode() == UtPLSQLNotInstalledException.ERROR_CODE) { |
| 119 | + throw new UtPLSQLNotInstalledException(e); |
| 120 | + } |
| 121 | + else { |
117 | 122 | // If the execution failed by unexpected reasons finishes all reporters, |
118 | 123 | // this way the users don't need to care about reporters' sessions hanging. |
119 | 124 | OracleConnection oraConn = conn.unwrap(OracleConnection.class); |
|
0 commit comments