made asm error handling more compact

Added error() method to AssemblyParser which makes the code more
readable.