def handle_errors(errors, format_error_func, filename):
 errors = list(sorted(errors, key=str))
 if (not errors):
  return
 error_msg = u'\n'.join((format_error_func(error) for error in errors))
 raise ConfigurationError(u'The Compose file{file_msg} is invalid because:\n{error_msg}'.format(file_msg=(u" '{}'".format(filename) if filename else u''), error_msg=error_msg))

def handle_errors ( errors , format_error_func , filename ) : errors = list ( sorted ( errors , key = str ) ) if ( not errors ) : return error_msg = u'\n' . join ( ( format_error_func ( error ) for error in errors ) ) raise ConfigurationError ( u'The Compose file{file_msg} is invalid because:\n{error_msg}' . format ( file_msg = ( u" '{}'" . format ( filename ) if filename else u'' ) , error_msg = error_msg ) )
jsonschema returns an error tree full of information to explain what has gone wrong .