Add basic++ error-handling