introducing cocoa style error handling
update to cocoa style error handling