added get_error implementation - fixes #163