Aqui está uma lista (incompleta) de classes Error que você pode querer lançar e que estão disponíveis no Rails: ActionController::ActionControllerErrorActionController::RedirectBackErrorActionController::RenderErrorActionController::RoutingErrorActionController::SessionOverflowErrorActionDispatch::RemoteIp::IpSpoofAttackErrorActionDispatch::Session::SessionRestoreErrorActionView::Helpers::NumberHelper::InvalidNumberErrorActiveModel::MassAssignmentSecurity::ErrorActiveModel::MissingAttributeErrorActiveRecord::ActiveRecordErrorActiveRecord::AttributeAssignmentErrorActiveRecord::ConfigurationErrorActiveRecord::ConnectionTimeoutErrorActiveRecord::DangerousAttributeErrorActiveRecord::DeleteRestrictionErrorActiveRecord::DuplicateMigrationNameErrorActiveRecord::DuplicateMigrationVersionErrorActiveRecord::EagerLoadPolymorphicErrorActiveRecord::HasManyThroughAssociationNotFoundErrorActiveRecord::HasManyThroughAssociationPointlessSourceTypeErrorActiveRecord::HasManyThroughAssociationPolymorphicSourceErrorActiveRecord::HasManyThroughAssociationPolymorphicThroughErrorActiveRecord::HasManyThroughSourceAssociationNotFoundErrorActiveRecord::IllegalMigrationNameErrorActiveRecord::InverseOfAssociationNotFoundErrorActiveRecord::StaleObjectErrorActiveRecord::Transactions::TransactionErrorActiveRecord::UnknownAttributeErrorActiveRecord::UnknownMigrationVersionErrorActiveResource::ClientErrorActiveResource::ConnectionErrorActiveResource::SSLErrorActiveResource::ServerErrorActiveResource::TimeoutErrorActiveSupport::JSON::Encoding::CircularReferenceErrorActiveSupport::SafeBuffer::SafeConcatErrorActiveSupport::Testing::RemoteErrorArgumentErrorEOFErrorEncodingErrorFiberErrorFloatDomainErrorIOErrorIndexErrorKeyErrorLoadErrorNameErrorNoMemoryErrorNoMethodErrorNotImplementedErrorRangeErrorRegexpErrorRuntimeErrorScriptErrorSecurityErrorSocketErrorStandardErrorStateMachine::ErrorStringScanner::ErrorSyntaxErrorSystemCallErrorSystemStackErrorThreadErrorTimeout::ErrorTypeErrorURI::BadURIErrorURI::ErrorURI::InvalidComponentErrorURI::InvalidURIError Se algum deles não estiver disponível, me avise, eu extraí …
Continuar lendo