在我的 ApplicationController 中,我有
rescue_from StorageExceptions::AuthorizationFailed, :with => handle_auth_error
def handle_auth_error
redirect_to error_path(403)
end
但代码没有捕捉到这个错误。我检查了被捕获的是带有消息的 NameError:“未捕获的 throw `StorageExceptions::AuthorizationFailed'”
为什么会这样,我怎样才能捕捉到实际的错误?