@@ -303,7 +303,7 @@ def __init__(
303303 type_schema = make_avsc_object (atype , names )
304304 except Exception as e :
305305 raise SchemaParseException (
306- f'Type property "{ atype } " not a valid Avro schema. '
306+ f'Type property "{ atype } " not a valid Avro schema: { e } '
307307 ) from e
308308 self .set_prop ("type" , type_schema )
309309 self .set_prop ("name" , name )
@@ -409,8 +409,8 @@ def __init__(
409409 items_schema = make_avsc_object (items , names )
410410 except Exception as err :
411411 raise SchemaParseException (
412- f"Items schema ({ items } ) not a valid Avro schema: (known "
413- f"names: { list (names .names .keys ())} )."
412+ f"Items schema ({ items } ) not a valid Avro schema: { err } . "
413+ f"Known names: { list (names .names .keys ())} )."
414414 ) from err
415415
416416 self .set_prop ("items" , items_schema )
@@ -451,7 +451,7 @@ def __init__(
451451 new_schema = make_avsc_object (schema , names )
452452 except Exception as err :
453453 raise SchemaParseException (
454- f"Union item must be a valid Avro schema: { schema } "
454+ f"Union item must be a valid Avro schema: { err } ; { schema } , "
455455 ) from err
456456 # check the new schema
457457 if (
@@ -506,10 +506,6 @@ def make_field_objects(field_data: List[PropsType], names: Names) -> List[Field]
506506 # make sure field name has not been used yet
507507 if new_field .name in parsed_fields :
508508 old_field = parsed_fields [new_field .name ]
509- if "inherited_from" not in old_field :
510- raise SchemaParseException (
511- f"Field name { new_field .name } already in use."
512- )
513509 if not is_subtype (old_field ["type" ], field ["type" ]):
514510 raise SchemaParseException (
515511 f"Field name { new_field .name } already in use with "
0 commit comments