feat: Add as_any() to opaque error

This commit is contained in:
evenyag
2022-05-09 12:35:55 +08:00
parent 5f48b4996b
commit d5de030600
8 changed files with 65 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
use std::any::Any;
use common_error::prelude::*;
use sqlparser::parser::ParserError;
@@ -42,6 +44,10 @@ impl ErrorExt for Error {
fn backtrace_opt(&self) -> Option<&Backtrace> {
ErrorCompat::backtrace(self)
}
fn as_any(&self) -> &dyn Any {
self
}
}
#[cfg(test)]