use generic exception handling
Merge pull request #1 from orta/yaml_exceptions

use generic exception handling