@@ -1031,22 +1031,22 @@ public void getDocument() throws InterruptedException, ExecutionException {
10311031 }
10321032 }
10331033
1034-
10351034 @ Test
1036- public void shouldIncludeExceptionMessage () {
1037- final String exceptionMessage = "My error context" ;
1038- final String action = "function (params) {"
1039- + "throw '" + exceptionMessage + "';"
1040- + "}" ;
1041- try {
1042- db .transaction (action , VPackSlice .class , null ).join ();
1043- fail ();
1044- } catch (final CompletionException e ) {
1045- Throwable cause = e .getCause ();
1046- if (cause instanceof ArangoDBException ) {
1047- assertTrue (((ArangoDBException ) cause ).getException ().equals (exceptionMessage ));
1048- } else {
1049- fail ("Root cause expected to be an ArangoDBException" );
1035+ public void shouldIncludeExceptionMessage () throws InterruptedException , ExecutionException {
1036+ final String version = db .getVersion ().get ().getVersion ();
1037+ if (version .startsWith ("3.1" ) || version .startsWith ("3.0" )) {
1038+ final String exceptionMessage = "My error context" ;
1039+ final String action = "function (params) {" + "throw '" + exceptionMessage + "';" + "}" ;
1040+ try {
1041+ db .transaction (action , VPackSlice .class , null ).join ();
1042+ fail ();
1043+ } catch (final CompletionException e ) {
1044+ final Throwable cause = e .getCause ();
1045+ if (cause instanceof ArangoDBException ) {
1046+ assertTrue (((ArangoDBException ) cause ).getException ().equals (exceptionMessage ));
1047+ } else {
1048+ fail ("Root cause expected to be an ArangoDBException" );
1049+ }
10501050 }
10511051 }
10521052 }
0 commit comments