We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3612e9 commit b57bef6Copy full SHA for b57bef6
src/main/java/org/casbin/Client.java
@@ -54,13 +54,11 @@ public static String run(String... args) {
54
return o.toString();
55
56
} catch (Exception e) {
57
- Throwable cause = e.getCause();
58
- 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.");
+ String errorMessage = e.getMessage();
+ if (errorMessage == null && e.getCause() != null) {
+ errorMessage = e.getCause().getMessage();
63
}
+ System.out.println(errorMessage);
64
System.exit(1);
65
66
return result;
0 commit comments