File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/com/qdesrame/openapi/diff Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
import com .qdesrame .openapi .diff .output .MarkdownRender ;
7
7
import org .apache .commons .cli .*;
8
8
import org .apache .commons .io .FileUtils ;
9
+ import org .apache .commons .lang3 .exception .ExceptionUtils ;
9
10
import org .apache .log4j .Level ;
10
11
import org .apache .log4j .LogManager ;
11
12
import org .slf4j .Logger ;
@@ -126,9 +127,13 @@ public static void main(String... args) {
126
127
}
127
128
}
128
129
System .exit (result .isDiff () ? 1 : 0 );
129
- } catch (ParseException exp ) {
130
+ } catch (ParseException e ) {
130
131
// oops, something went wrong
131
- System .err .println ("Parsing failed. Reason: " + exp .getMessage ());
132
+ System .err .println ("Parsing failed. Reason: " + e .getMessage ());
133
+ printHelp (options );
134
+ System .exit (2 );
135
+ } catch (Exception e ) {
136
+ System .err .println ("Unexpected exception. Reason: " + e .getMessage () + "\n " + ExceptionUtils .getStackTrace (e ));
132
137
printHelp (options );
133
138
System .exit (2 );
134
139
}
You can’t perform that action at this time.
0 commit comments