File tree Expand file tree Collapse file tree 1 file changed +3
-27
lines changed
src/Microsoft.OpenApi.Hidi Expand file tree Collapse file tree 1 file changed +3
-27
lines changed Original file line number Diff line number Diff line change @@ -49,42 +49,18 @@ CancellationToken cancellationToken
49
49
{
50
50
if ( string . IsNullOrEmpty ( openapi ) && string . IsNullOrEmpty ( csdl ) )
51
51
{
52
- throw new ArgumentNullException ( "Please input a file path" ) ;
52
+ throw new ArgumentException ( "Please input a file path" ) ;
53
53
}
54
- }
55
- catch ( ArgumentNullException ex )
56
- {
57
- #if DEBUG
58
- logger . LogCritical ( ex , ex . Message ) ;
59
- #else
60
- logger . LogCritical ( ex . Message ) ;
61
- #endif
62
- return ;
63
- }
64
- try
65
- {
66
54
if ( output == null )
67
55
{
68
- throw new ArgumentException ( nameof ( output ) ) ;
56
+ throw new ArgumentNullException ( nameof ( output ) ) ;
69
57
}
70
- }
71
- catch ( ArgumentException ex )
72
- {
73
- #if DEBUG
74
- logger . LogCritical ( ex , ex . Message ) ;
75
- #else
76
- logger . LogCritical ( ex . Message ) ;
77
- #endif
78
- return ;
79
- }
80
- try
81
- {
82
58
if ( output . Exists )
83
59
{
84
60
throw new IOException ( $ "The file { output } already exists. Please input a new file path.") ;
85
61
}
86
62
}
87
- catch ( IOException ex )
63
+ catch ( Exception ex )
88
64
{
89
65
#if DEBUG
90
66
logger . LogCritical ( ex , ex . Message ) ;
You can’t perform that action at this time.
0 commit comments