Using BEGIN_SAFE for exception handling