Improvind exception handling for deposit.withdraw operations