Adding first implementation of exception handling