Skip to content

Commit ae8d57c

Browse files
committed
Append unhandled exception message to trace
1 parent 3d01e74 commit ae8d57c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TorchSharp/Torch.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ internal static bool TryLoadNativeLibraryFromFile(string path, StringBuilder tra
6060
ok = NativeLibrary.TryLoad(path, out var res);
6161
if (!ok)
6262
trace.AppendLine($" Failed to load native component {path}");
63-
} catch {
63+
} catch (Exception exn) {
64+
trace.AppendLine($" Failed to load native component {path}: {exn.Message}");
6465
ok = false;
6566
}
6667
return ok;

0 commit comments

Comments
 (0)