Skip to content

Commit aa9e73e

Browse files
committed
Return ERROR_UNKNOWN instead of panicing
This change removes the panic from the shutdown code. Instead an ERROR_UNKNOWN is returned. This does cause the source of the error to be lost, but this can be addressed in a follow-up. Signed-off-by: Evan Lezar <[email protected]>
1 parent 5362631 commit aa9e73e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/nvml/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func Shutdown() Return {
4141

4242
err := libnvml.close()
4343
if err != nil {
44-
panic(err)
44+
return ERROR_UNKNOWN
4545
}
4646

4747
return ret

0 commit comments

Comments
 (0)