mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Avoid C# unused variable warnings in catch clauses.
library/io.file.m:
ssdb/ssdb.m:
Omit unused variables in catch clauses.
This commit is contained in:
@@ -1603,15 +1603,13 @@ get_temp_directory(Dir, !IO) :-
|
||||
[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe,
|
||||
may_not_duplicate],
|
||||
"
|
||||
#pragma warning disable 162, 168, 169, 219, 1717
|
||||
try {
|
||||
Dir = System.IO.Path.GetTempPath();
|
||||
OK = (Dir != null) ? 1 : 0;
|
||||
} catch (System.Exception _) {
|
||||
} catch (System.Exception) {
|
||||
Dir = null;
|
||||
OK = 0;
|
||||
}
|
||||
#pragma warning restore
|
||||
").
|
||||
|
||||
system_temp_dir("", 0, !IO).
|
||||
|
||||
@@ -506,14 +506,14 @@ public static class SigIntHandler implements sun.misc.SignalHandler {
|
||||
try {
|
||||
System.Console.TreatControlCAsInput = false;
|
||||
}
|
||||
catch (System.Exception e) {}
|
||||
catch (System.Exception) {}
|
||||
|
||||
try {
|
||||
System.Console.CancelKeyPress += new System.ConsoleCancelEventHandler(
|
||||
ssdb.sigint_handler
|
||||
);
|
||||
}
|
||||
catch (System.Exception e) {}
|
||||
catch (System.Exception) {}
|
||||
").
|
||||
|
||||
:- pragma foreign_proc("Java",
|
||||
|
||||
Reference in New Issue
Block a user