-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
28 lines (27 loc) · 1001 Bytes
/
Copy pathProgram.cs
File metadata and controls
28 lines (27 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace ShellTranslator {
class Program {
static int Main(string[] args) {
DeepLTranslator DTranslator = new DeepLTranslator();
try {
DTranslator.ParseArgs(args);
} catch (IncorrectLanguageException ile) {
Console.WriteLine(ile.Message);
return -1;
} catch (FileExtensionException fee) {
Console.WriteLine(fee.Message);
return -1;
} catch (ArgumentOutOfRangeException) {
Console.WriteLine("Missing output file");
return -1;
} catch (CriticalCharLimitException) {
Console.WriteLine("API Access has reached a critical character limit");
return -1;
} catch (NullReferenceException nre) {
Console.WriteLine(nre.Message);
return -1;
}
DTranslator.Launch().Wait();
return 0;
}
}
}