error/exception handling in an OO-ish way
