Adding Query to error output for database statement.
Patching ParserController and State-sample to handle structure metadata without stomping on it.