Skip to content

Commit c8cf300

Browse files
authored
feat(cubesql): Improve catching of panic's reason (#6107)
1 parent f71255a commit c8cf300

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/cubesql/cubesql/src/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ impl CubeError {
5353
pub fn panic(error: Box<dyn Any + Send>) -> Self {
5454
if let Some(reason) = error.downcast_ref::<&str>() {
5555
CubeError::internal(format!("Unexpected panic. Reason: {}", reason))
56+
} else if let Some(reason) = error.downcast_ref::<String>() {
57+
CubeError::internal(format!("Unexpected panic. Reason: {}", reason))
5658
} else {
5759
CubeError::internal("Unexpected panic without reason".to_string())
5860
}

0 commit comments

Comments
 (0)