Handling the runtime exception