File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,14 +72,14 @@ pub struct DbError {
7272 pub constraint : Option < String > ,
7373
7474 /// The file name of the source-code location where the error was reported.
75- pub file : String ,
75+ pub file : Option < String > ,
7676
7777 /// The line number of the source-code location where the error was
7878 /// reported.
79- pub line : u32 ,
79+ pub line : Option < u32 > ,
8080
8181 /// The name of the source-code routine reporting the error.
82- pub routine : String ,
82+ pub routine : Option < String > ,
8383
8484 _p : ( ) ,
8585}
@@ -113,9 +113,9 @@ impl DbErrorNew for DbError {
113113 column : map. remove ( & b'c' ) ,
114114 datatype : map. remove ( & b'd' ) ,
115115 constraint : map. remove ( & b'n' ) ,
116- file : try! ( map. remove ( & b'F' ) . ok_or ( ( ) ) ) ,
117- line : try! ( map. remove ( & b'L' ) . and_then ( |l| l. parse ( ) . ok ( ) ) . ok_or ( ( ) ) ) ,
118- routine : try! ( map. remove ( & b'R' ) . ok_or ( ( ) ) ) ,
116+ file : map. remove ( & b'F' ) ,
117+ line : map. remove ( & b'L' ) . and_then ( |l| l. parse ( ) . ok ( ) ) ,
118+ routine : map. remove ( & b'R' ) ,
119119 _p : ( ) ,
120120 } )
121121 }
You can’t perform that action at this time.
0 commit comments