<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_yaml_file(filename):
 """ Load a YAML file from disk, throw a ParserError on failure."""

    try:
        with open(filename, 'r') as f:
            return yaml.safe_load(f)
    except IOError as e:
        raise ParserError('Error opening ' + filename + ': ' + e.message)
    except ValueError as e:
        raise ParserError('Error parsing processes in {}: {}'
                          .format(filename, e.message))