Error Handling Changes

Signed-off-by: Chris Paine <chris@wombling.com>