We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 623968c commit c3612e9Copy full SHA for c3612e9
src/main/java/org/casbin/Client.java
@@ -54,8 +54,13 @@ public static String run(String... args) {
54
return o.toString();
55
56
} catch (Exception e) {
57
- e.printStackTrace();
58
- System.out.println("Run './casbin --help or ./casbin -h' for usage.");
+ Throwable cause = e.getCause();
+ if (cause instanceof org.casbin.jcasbin.exception.CasbinMatcherException) {
59
+ System.out.println(cause.getMessage());
60
+ } else {
61
+ e.printStackTrace();
62
+ System.out.println("Run './casbin --help or ./casbin -h' for usage.");
63
+ }
64
System.exit(1);
65
}
66
return result;
0 commit comments