Skip to content

Commit

Permalink
Return ERROR_UNKNOWN instead of panicing
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
elezar committed Apr 4, 2024
1 parent 5362631 commit aa9e73e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nvml/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Shutdown() Return {

err := libnvml.close()
if err != nil {
panic(err)
return ERROR_UNKNOWN
}

return ret
Expand Down

0 comments on commit aa9e73e

Please sign in to comment.