@@ -482,23 +482,16 @@ def __init__(self, toolpath_object, **kwargs):
482
482
elif key == "outputs" :
483
483
self .outputs_record_schema ["fields" ].append (c )
484
484
485
- try :
486
- self .inputs_record_schema = cast (Dict [six .text_type , Any ], schema_salad .schema .make_valid_avro (self .inputs_record_schema , {}, set ()))
485
+ with SourceLine (toolpath_object , "inputs" , validate .ValidationException ):
486
+ self .inputs_record_schema = cast (
487
+ Dict [six .text_type , Any ], schema_salad .schema .make_valid_avro (
488
+ self .inputs_record_schema , {}, set ()))
487
489
AvroSchemaFromJSONData (self .inputs_record_schema , self .names )
488
- except avro .schema .SchemaParseException as e :
489
- raise validate .ValidationException (u"Got error '%s' while "
490
- "processing inputs of %s:\n %s" %
491
- (Text (e ), self .tool ["id" ],
492
- json .dumps (self .inputs_record_schema , indent = 4 )))
493
-
494
- try :
495
- self .outputs_record_schema = cast (Dict [six .text_type , Any ], schema_salad .schema .make_valid_avro (self .outputs_record_schema , {}, set ()))
490
+ with SourceLine (toolpath_object , "outputs" , validate .ValidationException ):
491
+ self .outputs_record_schema = cast (Dict [six .text_type , Any ],
492
+ schema_salad .schema .make_valid_avro (
493
+ self .outputs_record_schema , {}, set ()))
496
494
AvroSchemaFromJSONData (self .outputs_record_schema , self .names )
497
- except avro .schema .SchemaParseException as e :
498
- raise validate .ValidationException (u"Got error '%s' while "
499
- "processing outputs of %s:\n %s" %
500
- (Text (e ), self .tool ["id" ],
501
- json .dumps (self .outputs_record_schema , indent = 4 )))
502
495
503
496
if toolpath_object .get ("class" ) is not None and not kwargs .get ("disable_js_validation" , False ):
504
497
if kwargs .get ("js_hint_options_file" ) is not None :
0 commit comments