added new error reporting mechanism, removed old variables.
Authored by: gonnet 2010-12-10
Parent: [r28]
Child: [r30]