refactored error handling, less error prone
Merge pull request #124 from Tieske/refactor_builtin_error

refactored error handling, less error prone