@@ -5,24 +5,25 @@ class Workflow
55 module States
66 module InputOutputMixin
77 def process_input ( context )
8- input = input_path . value ( context , context . input )
9- input = parameters . value ( context , input ) if parameters
8+ input = wrap_runtime_error ( "InputPath" , input_path . to_s ) { input_path . value ( context , context . input ) }
9+ input = wrap_runtime_error ( "Parameters" , parameters . to_s ) { parameters . value ( context , input ) } if parameters
1010 input
1111 end
1212
1313 def process_output ( context , results )
1414 return context . input . dup if results . nil?
1515 return if output_path . nil?
1616
17- results = result_selector . value ( context , results ) if @result_selector
17+ results = wrap_runtime_error ( "ResultSelector" , @ result_selector. to_s ) { result_selector . value ( context , results ) } if @result_selector
1818 if result_path . payload . match? ( /^\$ \$ \. Credentials\b / )
19- context . credentials . merge! ( result_path . set ( context . credentials , results ) )
19+ credentials = wrap_runtime_error ( "ResultPath" , result_path . to_s ) { result_path . set ( context . credentials , results ) }
20+ context . credentials . merge! ( credentials ) if credentials
2021 output = context . input . dup
2122 else
2223 output = result_path . set ( context . input . dup , results )
2324 end
2425
25- output_path . value ( context , output )
26+ wrap_runtime_error ( "OutputPath" , output_path . to_s ) { output_path . value ( context , output ) }
2627 end
2728 end
2829 end
0 commit comments