File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
crates/decompile/src/core/out Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,16 @@ pub async fn build_source(
122122 debug ! ( "llm postprocessing 0x{} source" , f. selector) ;
123123
124124 let postprocessed_source =
125- annotate_function ( & function_source. join ( "\n " ) , & openai_api_key) . await ?;
125+ annotate_function ( & function_source. join ( "\n " ) , & openai_api_key)
126+ . await
127+ . map_err ( |e| {
128+ debug ! (
129+ "llm postprocessing 0x{} source failed: {:?}" ,
130+ f. selector, e
131+ ) ;
132+ e
133+ } )
134+ . ok ( ) ;
126135
127136 debug ! (
128137 "llm postprocessing 0x{} source took {:?}" ,
@@ -131,8 +140,10 @@ pub async fn build_source(
131140 ) ;
132141
133142 // replace the function source with the postprocessed source
134- function_source =
135- postprocessed_source. split ( '\n' ) . map ( |x| x. to_string ( ) ) . collect ( ) ;
143+ if let Some ( postprocessed_source) = postprocessed_source {
144+ function_source =
145+ postprocessed_source. split ( '\n' ) . map ( |x| x. to_string ( ) ) . collect ( ) ;
146+ }
136147 }
137148
138149 Ok :: < Vec < String > , eyre:: Report > ( function_source)
You can’t perform that action at this time.
0 commit comments