We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32538f2 commit 8dc87b9Copy full SHA for 8dc87b9
src/driver/result.rs
@@ -60,11 +60,18 @@ impl DriverError {
60
61
impl std::fmt::Debug for DriverError {
62
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63
- let err_str = self.error_string().unwrap();
64
- f.debug_tuple("DriverError")
65
- .field(&self.0)
66
- .field(&err_str)
67
- .finish()
+ match self.error_string() {
+ Ok(err_str) => f
+ .debug_tuple("DriverError")
+ .field(&self.0)
+ .field(err_str)
68
+ .finish(),
69
+ Err(_) => f
70
71
72
+ .field(&"<Failure when calling cuGetErrorString()>")
73
74
+ }
75
}
76
77
0 commit comments