@@ -482,23 +482,17 @@ 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" ,
486
+ avro .schema .SchemaParseException ):
487
+ self .inputs_record_schema = cast (
488
+ Dict [six .text_type , Any ], schema_salad .schema .make_valid_avro (
489
+ self .inputs_record_schema , {}, set ()))
487
490
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 ()))
491
+ with SourceLine (toolpath_object , "outputs" , avro .schema .SchemaParseException ):
492
+ self .outputs_record_schema = cast (Dict [six .text_type , Any ],
493
+ schema_salad .schema .make_valid_avro (
494
+ self .outputs_record_schema , {}, set ()))
496
495
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
496
503
497
if toolpath_object .get ("class" ) is not None and not kwargs .get ("disable_js_validation" , False ):
504
498
if kwargs .get ("js_hint_options_file" ) is not None :
0 commit comments