Commit cc4d93f 1 parent e946141 commit cc4d93f Copy full SHA for cc4d93f
File tree 1 file changed +14
-3
lines changed
crates/decompile/src/core/out
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(
122
122
debug ! ( "llm postprocessing 0x{} source" , f. selector) ;
123
123
124
124
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 ( ) ;
126
135
127
136
debug ! (
128
137
"llm postprocessing 0x{} source took {:?}" ,
@@ -131,8 +140,10 @@ pub async fn build_source(
131
140
) ;
132
141
133
142
// 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
+ }
136
147
}
137
148
138
149
Ok :: < Vec < String > , eyre:: Report > ( function_source)
You can’t perform that action at this time.
0 commit comments