File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
src/main/java/org/utplsql/cli Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 33import com .beust .jcommander .JCommander ;
44import com .beust .jcommander .Parameter ;
55import com .beust .jcommander .ParameterException ;
6+ import org .utplsql .api .exception .DatabaseNotCompatibleException ;
67
78public class Cli {
89
@@ -34,6 +35,8 @@ public static void main(String[] args) {
3435 } else {
3536 jc .usage ();
3637 }
38+ } catch ( DatabaseNotCompatibleException e ) {
39+ System .out .println (e .getMessage ());
3740 } catch (Exception e ) {
3841 e .printStackTrace ();
3942 }
Original file line number Diff line number Diff line change 33import com .beust .jcommander .Parameter ;
44import com .beust .jcommander .Parameters ;
55import org .utplsql .api .*;
6+ import org .utplsql .api .compatibility .CompatibilityProxy ;
67import org .utplsql .api .exception .DatabaseNotCompatibleException ;
78import org .utplsql .api .exception .SomeTestsFailedException ;
89import org .utplsql .api .reporter .Reporter ;
@@ -264,14 +265,10 @@ public List<ReporterOptions> getReporterOptionsList() {
264265 */
265266 private void checkFrameworkCompatibility (Connection conn ) throws SQLException {
266267
267- if ( !skipCompatibilityCheck ) {
268- try {
269- DBHelper .failOnVersionCompatibilityCheckFailed (conn );
270- } catch (DatabaseNotCompatibleException e ) {
271- System .out .println (e .getMessage ());
268+ CompatibilityProxy proxy = new CompatibilityProxy (conn , skipCompatibilityCheck );
272269
273- throw e ;
274- }
270+ if ( ! skipCompatibilityCheck ) {
271+ proxy . failOnNotCompatible ();
275272 }
276273 else {
277274 System .out .println ("Skipping Compatibility check with framework version, expecting the latest version " +
You can’t perform that action at this time.
0 commit comments