Disable alerts and throw a proper error on assert