1- use std:: { backtrace:: Backtrace , collections:: HashMap } ;
2- use std:: fmt:: Formatter ;
1+ use std:: { backtrace:: Backtrace , collections:: HashMap , fmt:: Formatter } ;
32
43#[ derive( Debug ) ]
54pub enum CompilationError {
@@ -12,10 +11,19 @@ pub enum CompilationError {
1211impl std:: fmt:: Display for CompilationError {
1312 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
1413 match self {
15- CompilationError :: Internal ( message, _, _) => f. write_fmt ( format_args ! ( "SQLCompilationError: Internal: {}" , message) ) ,
16- CompilationError :: User ( message, _) => f. write_fmt ( format_args ! ( "SQLCompilationError: User: {}" , message) ) ,
17- CompilationError :: Unsupported ( message, _) => f. write_fmt ( format_args ! ( "SQLCompilationError: Unsupported: {}" , message) ) ,
18- CompilationError :: Fatal ( message, _) => f. write_fmt ( format_args ! ( "SQLCompilationError: Fatal: {}" , message) )
14+ CompilationError :: Internal ( message, _, _) => {
15+ f. write_fmt ( format_args ! ( "SQLCompilationError: Internal: {}" , message) )
16+ }
17+ CompilationError :: User ( message, _) => {
18+ f. write_fmt ( format_args ! ( "SQLCompilationError: User: {}" , message) )
19+ }
20+ CompilationError :: Unsupported ( message, _) => f. write_fmt ( format_args ! (
21+ "SQLCompilationError: Unsupported: {}" ,
22+ message
23+ ) ) ,
24+ CompilationError :: Fatal ( message, _) => {
25+ f. write_fmt ( format_args ! ( "SQLCompilationError: Fatal: {}" , message) )
26+ }
1927 }
2028 }
2129}
0 commit comments