more error propagation
Merge pull request #2535 from WalterBright/statement-errors

more error propagation