Use error class for error messages

(Makes it easier for parser functions like #iferror to detect errors)
Merge pull request #8 from lethosor/asvae-master

Use error class for error messages