From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 741B01F4BE for ; Tue, 29 Oct 2024 19:24:43 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=yLSHOc8C; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ZUZDtl5a; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1730229850; bh=1xsDPf6TPh6GJMUunsWIPpBvNMtEYDzcAqshfKlv+Js=; h=References:In-Reply-To:Date:To:Reply-To:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From:Cc:From; b=yLSHOc8CFhCXCfSz9+VnawSxbHOCb0duFLePFtlzz+IPFQ8/gJUgKZK/zt0q3Hzsq 16u4nlUkfwJGkNVieFZA8qedUwP/fGVpAMGVUCv2+V8MtzM42fJMBAk97FqM3IWuFL f5wC3EGaUkjX7WBtpEVs6XkJeqKVh8TjJupRrr/M= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 857CC44AD2 for ; Tue, 29 Oct 2024 19:24:10 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ZUZDtl5a; dkim-atps=neutral Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by nue.mailmanlists.eu (Postfix) with ESMTPS id E5FAF43FAF for ; Tue, 29 Oct 2024 19:23:17 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-7b14077ec5aso17009885a.1 for ; Tue, 29 Oct 2024 12:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730229737; x=1730834537; darn=ml.ruby-lang.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XovVXS8+fm6OShBnq3wVe06tnLLd7ljIfAuqFaxdhng=; b=ZUZDtl5amJUY/V3kE8OCZl8eA8C+S3P22Gu92IheQYrIlfo/lMbV0PodDD6XB52SB5 zkmiehm1c2sF3Zvde+k+VPLhqcubxGOhwfXiquiJaNBf9BkuScRAbH3a4vz7rkbEMUx7 fBHXLvUQZF+gNpL7zh96i8XKjHHP98aQjqLlVO1oXdIv2b3fthoGnQvqS19pzIx4gOxX SzR18382vG9qej7tTMLmVqwlC2v3U0tcBqmt4+EsPNgEs8yzYNYgk+GkvL5KqyZeh6nE Rri4knpn7IByPjivSiQVH/TBcrSjXJaevT+JgSJhoQcO9xBiueQMkIx/quwaDiq5WRpj KsTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730229737; x=1730834537; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XovVXS8+fm6OShBnq3wVe06tnLLd7ljIfAuqFaxdhng=; b=Z4ZaHbw0ouuXzlK5E2A3mPNPczFWNiGvWZSsYHgOn2ZtkPshv+7JBINgdGyvRYpEEZ 31j9g812S/+qsxfc/NVzKoX3rFKOOJkHloIRN/KKiLnBr/LpoMqU10W7oSYcDw9hIJvB 2uPE02Ki1ENHa9wcNd6ZwKxUEkzkHviHfEyAKwAbqMtblBmBN7BiPjfwTotVpicHWWKO d18LkoaBopGcJlnur402TOOTGbpN1etOpEu8huqogDYI3LnCcCP4xNJfgf7+ju9J/Cl2 6J32jZXGu240T+9v8JYpMJbywZCJ6+crBCMAw8hstF50VIGCiy798zIkZqzi/QE66Gi5 Xxkg== X-Gm-Message-State: AOJu0YzT4vsYftw8jGQuumLI7QHJDas5NfDwczul0IwN8NOx+nq6sCfH xnn1cTfP0AaP8QaS8KRUT5eL6yit4j7YahYSjnrMeBCP9G1ysGNY7optr7gNzOeMoF5R8CyLiIs 5z/oXA2lnXOcwzPGtw9BT1TQ9rP7aZEa45ma+tA== X-Google-Smtp-Source: AGHT+IF+KXJ4gK3pMzQCBBUdAlv6QlzRnMWtaAB0XiVy5gL1gmaJz+RmJO3HlX9zmsaHwGSZXHU5iWzj6qPY23NjnuE= X-Received: by 2002:a05:6214:d42:b0:6cb:55e4:54d5 with SMTP id 6a1803df08f44-6d2c0c5e63bmr55418076d6.10.1730229736634; Tue, 29 Oct 2024 12:22:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 29 Oct 2024 16:22:05 -0300 Message-ID: To: Austin Ziegler Message-ID-Hash: WB5ZI37J6FFWEOH4YBRKPDWZZQ5Q2WZG X-Message-ID-Hash: WB5ZI37J6FFWEOH4YBRKPDWZZQ5Q2WZG X-MailFrom: rr.rosas@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:119640] Re: Behavior of raising from rescue blocks when multiple rescue blocks exist List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Rodrigo Rosenfeld Rosas via ruby-core Cc: Ruby developers , Rodrigo Rosenfeld Rosas Content-Type: multipart/mixed; boundary="===============0106496388423345672==" --===============0106496388423345672== Content-Type: multipart/alternative; boundary="000000000000d503280625a280a2" --000000000000d503280625a280a2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > rescues happen exactly once per exception handling block. Awesome, great to know that and for the explanation on why both methods yield different results. I totally forgot RuntimeError is an StandardError. Em ter., 29 de out. de 2024 =C3=A0s 15:07, Austin Ziegler escreveu: > RuntimeError is a descendant of StandardError, and rescues happen exactly > once per exception handling block. > > That is, your first code example will never hit RuntimeError because it's > swallowed by the implicit StandardError. > > Here's a class tree of Exception from my local irb: > > - Exception > |- ErrorHighlight::Spotter::NonAscii > |- IRB::Abort > |- IRB::LoadAbort > |- NoMemoryError > |- ScriptError > | |- LoadError > | | `- Gem::LoadError > | | |- Gem::ConflictError > | | `- Gem::MissingSpecError > | | `- Gem::MissingSpecVersionError > | |- NotImplementedError > | `- SyntaxError > |- SecurityError > |- SignalException > | `- Interrupt > |- StandardError > | |- ArgumentError > | | |- Gem::Requirement::BadRequirementError > | | |- IO::Buffer::MaskError > | | `- UncaughtThrowError > | |- EncodingError > | | |- Encoding::CompatibilityError > | | |- Encoding::ConverterNotFoundError > | | |- Encoding::InvalidByteSequenceError > | | `- Encoding::UndefinedConversionError > | |- FiberError > | |- Fiddle::Error > | | |- Fiddle::ClearedReferenceError > | | `- Fiddle::DLError > | |- Gem::Molinillo::ResolverError > | | |- Gem::Molinillo::CircularDependencyError > | | |- Gem::Molinillo::NoSuchDependencyError > | | `- Gem::Molinillo::VersionConflict > | |- Gem::TSort::Cyclic > | |- IOError > | | |- EOFError > | | `- IO::TimeoutError > | |- IRB::CantChangeBinding > | |- IRB::CantReturnToNormalMode > | |- IRB::Command::CommandArgumentError > | |- IRB::IllegalParameter > | |- IRB::IrbAlreadyDead > | |- IRB::IrbSwitchedToCurrentThread > | |- IRB::NoSuchJob > | |- IRB::RubyLex::TerminateLineInput > | |- IRB::SourceFinder::EvaluationError > | |- IRB::UndefinedPromptMode > | |- IRB::UnrecognizedSwitch > | |- IndexError > | | |- KeyError > | | `- StopIteration > | | |- ClosedQueueError > | | `- Ractor::ClosedError > | |- JSON::JSONError > | | |- JSON::GeneratorError > | | |- JSON::MissingUnicodeSupport > | | `- JSON::ParserError > | | `- JSON::NestingError > | | `- JSON::CircularDatastructure > | |- LocalJumpError > | |- Math::DomainError > | |- NameError > | | `- NoMethodError > | |- NoMatchingPatternError > | | `- NoMatchingPatternKeyError > | |- RangeError > | | `- FloatDomainError > | |- RegexpError > | | `- Regexp::TimeoutError > | |- Reline::ConfigEncodingConversionError > | |- Reline::Terminfo::TerminfoError > | |- Ripper::TokenPattern::Error > | | |- Ripper::TokenPattern::CompileError > | | `- Ripper::TokenPattern::MatchError > | |- RuntimeError > | | |- FrozenError > | | |- Gem::Exception > | | | |- Gem::CommandLineError > | | | |- Gem::DependencyError > | | | | |- Gem::DependencyResolutionError > | | | | `- Gem::UnsatisfiableDependencyError > | | | |- Gem::DependencyRemovalException > | | | |- Gem::DocumentError > | | | |- Gem::EndOfYAMLException > | | | |- Gem::FilePermissionError > | | | |- Gem::FormatException > | | | |- Gem::GemNotFoundException > | | | | `- Gem::SpecificGemNotFoundException > | | | |- Gem::GemNotInHomeException > | | | |- Gem::ImpossibleDependenciesError > | | | |- Gem::InstallError > | | | | `- Gem::RuntimeRequirementNotMetError > | | | |- Gem::InvalidSpecificationException > | | | |- Gem::OperationNotSupportedError > | | | |- Gem::RemoteError > | | | |- Gem::RemoteInstallationCancelled > | | | |- Gem::RemoteInstallationSkipped > | | | |- Gem::RemoteSourceException > | | | |- Gem::RequestSet::Lockfile::ParseError > | | | |- Gem::RubyVersionMismatch > | | | |- Gem::UninstallError > | | | |- Gem::UnknownCommandError > | | | |- Gem::VerificationError > | | | `- Gem::WebauthnVerificationError > | | |- IO::Buffer::AccessError > | | |- IO::Buffer::AllocationError > | | |- IO::Buffer::InvalidatedError > | | |- IO::Buffer::LockedError > | | |- RDoc::Error > | | |- Ractor::Error > | | | |- Ractor::IsolationError > | | | |- Ractor::MovedError > | | | |- Ractor::RemoteError > | | | `- Ractor::UnsafeError > | | `- Reline::Config::InvalidInputrc > | |- SystemCallError > | | |- Errno::E2BIG > | | |- Errno::EACCES > | | |- Errno::EADDRINUSE > | | |- Errno::EADDRNOTAVAIL > | | |- Errno::EAFNOSUPPORT > | | |- Errno::EAGAIN > | | | |- IO::EAGAINWaitReadable > | | | `- IO::EAGAINWaitWritable > | | |- Errno::EALREADY > | | |- Errno::EAUTH > | | |- Errno::EBADARCH > | | |- Errno::EBADEXEC > | | |- Errno::EBADF > | | |- Errno::EBADMACHO > | | |- Errno::EBADMSG > | | |- Errno::EBADRPC > | | |- Errno::EBUSY > | | |- Errno::ECANCELED > | | |- Errno::ECHILD > | | |- Errno::ECONNABORTED > | | |- Errno::ECONNREFUSED > | | |- Errno::ECONNRESET > | | |- Errno::EDEADLK > | | |- Errno::EDESTADDRREQ > | | |- Errno::EDEVERR > | | |- Errno::EDOM > | | |- Errno::EDQUOT > | | |- Errno::EEXIST > | | |- Errno::EFAULT > | | |- Errno::EFBIG > | | |- Errno::EFTYPE > | | |- Errno::EHOSTDOWN > | | |- Errno::EHOSTUNREACH > | | |- Errno::EIDRM > | | |- Errno::EILSEQ > | | |- Errno::EINPROGRESS > | | | |- IO::EINPROGRESSWaitReadable > | | | `- IO::EINPROGRESSWaitWritable > | | |- Errno::EINTR > | | |- Errno::EINVAL > | | |- Errno::EIO > | | |- Errno::EISCONN > | | |- Errno::EISDIR > | | |- Errno::ELAST > | | |- Errno::ELOOP > | | |- Errno::EMFILE > | | |- Errno::EMLINK > | | |- Errno::EMSGSIZE > | | |- Errno::EMULTIHOP > | | |- Errno::ENAMETOOLONG > | | |- Errno::ENEEDAUTH > | | |- Errno::ENETDOWN > | | |- Errno::ENETRESET > | | |- Errno::ENETUNREACH > | | |- Errno::ENFILE > | | |- Errno::ENOATTR > | | |- Errno::ENOBUFS > | | |- Errno::ENODATA > | | |- Errno::ENODEV > | | |- Errno::ENOENT > | | |- Errno::ENOEXEC > | | |- Errno::ENOLCK > | | |- Errno::ENOLINK > | | |- Errno::ENOMEM > | | |- Errno::ENOMSG > | | |- Errno::ENOPOLICY > | | |- Errno::ENOPROTOOPT > | | |- Errno::ENOSPC > | | |- Errno::ENOSR > | | |- Errno::ENOSTR > | | |- Errno::ENOSYS > | | |- Errno::ENOTBLK > | | |- Errno::ENOTCONN > | | |- Errno::ENOTDIR > | | |- Errno::ENOTEMPTY > | | |- Errno::ENOTRECOVERABLE > | | |- Errno::ENOTSOCK > | | |- Errno::ENOTSUP > | | |- Errno::ENOTTY > | | |- Errno::ENXIO > | | |- Errno::EOPNOTSUPP > | | |- Errno::EOVERFLOW > | | |- Errno::EOWNERDEAD > | | |- Errno::EPERM > | | |- Errno::EPFNOSUPPORT > | | |- Errno::EPIPE > | | |- Errno::EPROCLIM > | | |- Errno::EPROCUNAVAIL > | | |- Errno::EPROGMISMATCH > | | |- Errno::EPROGUNAVAIL > | | |- Errno::EPROTO > | | |- Errno::EPROTONOSUPPORT > | | |- Errno::EPROTOTYPE > | | |- Errno::EPWROFF > | | |- Errno::ERANGE > | | |- Errno::EREMOTE > | | |- Errno::EROFS > | | |- Errno::ERPCMISMATCH > | | |- Errno::ESHLIBVERS > | | |- Errno::ESHUTDOWN > | | |- Errno::ESOCKTNOSUPPORT > | | |- Errno::ESPIPE > | | |- Errno::ESRCH > | | |- Errno::ESTALE > | | |- Errno::ETIME > | | |- Errno::ETIMEDOUT > | | |- Errno::ETOOMANYREFS > | | |- Errno::ETXTBSY > | | |- Errno::EUSERS > | | |- Errno::EXDEV > | | `- Errno::NOERROR > | |- ThreadError > | |- TypeError > | `- ZeroDivisionError > |- SystemExit > | `- Gem::SystemExitException > |- SystemStackError > `- fatal > > -a > > On Tue, Oct 29, 2024 at 8:48=E2=80=AFAM Rodrigo Rosenfeld Rosas via ruby-= core < > ruby-core@ml.ruby-lang.org> wrote: > >> Hello, I couldn't find any documentation about the subject, so I thought >> this behavior should be probably documented. >> >> Given the following code: >> >> def raise_error >> raise "runtime error message" >> rescue =3D> e >> "StandardError: #{e.message}" >> rescue RuntimeError =3D> e >> puts "RuntimeError raised: #{e.message}" >> raise StandardError, "standard error message" >> end >> >> # same, but the order of the rescue blocks are inverted >> def raise_error2 >> raise "runtime error message" >> rescue RuntimeError =3D> e >> puts "RuntimeError raised: #{e.message}" >> raise StandardError, "standard error message" >> rescue =3D> e >> "StandardError: #{e.message}" >> end >> >> p ["raise_error", raise_error ] >> >> begin >> p ["raise_error2", raise_error2] >> rescue =3D> e >> puts "raise_error2 raised: #{e.message}" >> end >> >> When we run it, this is the output in Ruby 3.3.5: >> >> ["raise_error", "StandardError: runtime error message"] >> >> RuntimeError raised: runtime error message >> >> raise_error2 raised: standard error message >> >> >> In the first case (raise_error), the code raised from the RuntimeError >> rescue block is rescued by the StandardError block, but when inverting t= he >> order of the rescue blocks (raise_error2) then this won't happen. >> >> Is this part of the specs? Is this behavior documented somewhere? Could >> this behavior differ in different Ruby implementations and versions? Or = can >> we rely on such behavior? >> >> >> This chapter doesn't include such case in its examples: >> >> https://ruby-doc.com/docs/ProgrammingRuby/html/tut_exceptions.html >> >> Or this documentation about Exceptions: >> >> https://ruby-doc.org/3.3.5/syntax/exceptions_rdoc.html >> >> Is there a recommended way for wrapping exceptions into a particular one >> and then handling that exception from within the same method rescue bloc= ks? >> Or is this considered a bad practice? >> >> >> ______________________________________________ >> ruby-core mailing list -- ruby-core@ml.ruby-lang.org >> To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org >> ruby-core info -- >> https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/ > > > > -- > Austin Ziegler =E2=80=A2 halostatue@gmail.com =E2=80=A2 austin@halostatue= .ca > http://www.halostatue.ca/ =E2=80=A2 http://twitter.com/halostatue > --000000000000d503280625a280a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> rescues happen exactly once per exception handling=C2= =A0block.

Awesome, great to know that and for the explanation on why= both methods yield different results. I totally forgot RuntimeError is an = StandardError.

Em ter., 29 de out. de 2024 =C3=A0s 15:07, Austin Ziegler &= lt;halostatue@gmail.com> esc= reveu:
RuntimeError is a descendant of StandardError, and rescues happen = exactly once per exception handling=C2=A0block.

That is,= your first code example will never hit RuntimeError because it's swall= owed by the implicit StandardError.

Here's a c= lass tree of Exception from my local irb:

- Except= ion
=C2=A0 =C2=A0 |- ErrorHighlight::Spotter::NonAscii
=C2=A0 =C2=A0 = |- IRB::Abort
=C2=A0 =C2=A0 |- IRB::LoadAbort
=C2=A0 =C2=A0 |- NoMemo= ryError
=C2=A0 =C2=A0 |- ScriptError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- = LoadError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Gem::LoadError<= br>=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 |- Gem::Confl= ictError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 `- G= em::MissingSpecError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0`- Gem::MissingSpecVersionError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0|- NotImplementedError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0`= - SyntaxError
=C2=A0 =C2=A0 |- SecurityError
=C2=A0 =C2=A0 |- SignalE= xception
=C2=A0 =C2=A0 | =C2=A0 =C2=A0`- Interrupt
=C2=A0 =C2=A0 |- S= tandardError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- ArgumentError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Requirement::BadRequirementError<= br>=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- IO::Buffer::MaskError
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- UncaughtThrowError
=C2=A0= =C2=A0 | =C2=A0 =C2=A0|- EncodingError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Encoding::CompatibilityError
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Encoding::ConverterNotFoundError
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Encoding::InvalidByteSequenceError
=C2=A0= =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Encoding::UndefinedConversionError=
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- FiberError
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0|- Fiddle::Error
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Fi= ddle::ClearedReferenceError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0= `- Fiddle::DLError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Gem::Molinillo::Resol= verError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Molinillo::= CircularDependencyError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- G= em::Molinillo::NoSuchDependencyError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0`- Gem::Molinillo::VersionConflict
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0|- Gem::TSort::Cyclic
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IOError
=C2= =A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- EOFError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0`- IO::TimeoutError
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0|- IRB::CantChangeBinding
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::CantRe= turnToNormalMode
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::Command::CommandAr= gumentError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::IllegalParameter
=C2= =A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::IrbAlreadyDead
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0|- IRB::IrbSwitchedToCurrentThread
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|-= IRB::NoSuchJob
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::RubyLex::TerminateL= ineInput
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::SourceFinder::EvaluationEr= ror
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- IRB::UndefinedPromptMode
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0|- IRB::UnrecognizedSwitch
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0|- IndexError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- KeyEr= ror
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- StopIteration
=C2= =A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 |- ClosedQueueError=
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 `- Ractor::C= losedError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- JSON::JSONError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- JSON::GeneratorError
=C2=A0 =C2=A0 = | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- JSON::MissingUnicodeSupport
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- JSON::ParserError
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 `- JSON::NestingError
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`- = JSON::CircularDatastructure
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- LocalJumpErr= or
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Math::DomainError
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0|- NameError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`-= NoMethodError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- NoMatchingPatternError=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- NoMatchingPatternKeyError=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- RangeError
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0`- FloatDomainError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Re= gexpError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Regexp::Timeout= Error
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Reline::ConfigEncodingConversionEr= ror
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Reline::Terminfo::TerminfoError
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0|- Ripper::TokenPattern::Error
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Ripper::TokenPattern::CompileError
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Ripper::TokenPattern::MatchE= rror
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- RuntimeError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- FrozenError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Gem::Exception
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Gem::CommandLineError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0= | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::DependencyError
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Dependenc= yResolutionError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 = =C2=A0| =C2=A0 =C2=A0`- Gem::UnsatisfiableDependencyError
=C2=A0 =C2=A0 = | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::DependencyRemovalExcep= tion
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::= DocumentError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Gem::EndOfYAMLException
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Gem::FilePermissionError
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::FormatException
=C2=A0 =C2=A0 |= =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::GemNotFoundException=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0= `- Gem::SpecificGemNotFoundException
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Gem::GemNotInHomeException
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::ImpossibleDependenciesEr= ror
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::I= nstallError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|= =C2=A0 =C2=A0`- Gem::RuntimeRequirementNotMetError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::InvalidSpecificationExcepti= on
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Op= erationNotSupportedError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Gem::RemoteError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Gem::RemoteInstallationCancelled
=C2=A0 =C2=A0 |= =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::RemoteInstallationSkipp= ed
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Re= moteSourceException
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0= =C2=A0|- Gem::RequestSet::Lockfile::ParseError
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::RubyVersionMismatch
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::UninstallError<= br>=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Gem::Unkno= wnCommandError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Gem::VerificationError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0| =C2=A0 =C2=A0`- Gem::WebauthnVerificationError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- IO::Buffer::AccessError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- IO::Buffer::AllocationError
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- IO::Buffer::InvalidatedError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- IO::Buffer::LockedError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- RDoc::Error
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Ractor::Error
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Ractor::IsolationError
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Ractor::MovedError
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Ractor::RemoteError
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Ractor::Unsaf= eError
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0`- Reline::Config::In= validInputrc
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- SystemCallError
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::E2BIG
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EACCES
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|= =C2=A0 =C2=A0|- Errno::EADDRINUSE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0= =C2=A0|- Errno::EADDRNOTAVAIL
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Errno::EAFNOSUPPORT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|-= Errno::EAGAIN
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- IO::EAGAINWaitReadable
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0| =C2=A0 =C2=A0`- IO::EAGAINWaitWritable
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Errno::EALREADY
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0|- Errno::EAUTH
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|-= Errno::EBADARCH
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::E= BADEXEC
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EBADF
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EBADMACHO
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EBADMSG
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EBADRPC
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Errno::EBUSY
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 = =C2=A0|- Errno::ECANCELED
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|-= Errno::ECHILD
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ECO= NNABORTED
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ECONNREF= USED
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ECONNRESET=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EDEADLK
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EDESTADDRREQ
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EDEVERR
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EDOM
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Errno::EDQUOT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Errno::EEXIST
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno= ::EFAULT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EFBIG
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EFTYPE
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EHOSTDOWN
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EHOSTUNREACH
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EIDRM
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Errno::EILSEQ
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Errno::EINPROGRESS
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- IO::EINPROGRESSWaitReadable
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0| =C2=A0 =C2=A0`- IO::EINPROGRESSWaitWritable
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EINTR
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EINVAL
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|= =C2=A0 =C2=A0|- Errno::EIO
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0= |- Errno::EISCONN
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::= EISDIR
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ELAST
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ELOOP
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EMFILE
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EMLINK
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|= =C2=A0 =C2=A0|- Errno::EMSGSIZE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 = =C2=A0|- Errno::EMULTIHOP
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|-= Errno::ENAMETOOLONG
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errn= o::ENEEDAUTH
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENETD= OWN
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENETRESET
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENETUNREACH
=C2=A0= =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENFILE
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOATTR
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0| =C2=A0 =C2=A0|- Errno::ENOBUFS
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0|- Errno::ENODATA
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0= |- Errno::ENODEV
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::E= NOENT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOEXEC
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOLCK
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOLINK
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOMEM
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|= =C2=A0 =C2=A0|- Errno::ENOMSG
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2= =A0|- Errno::ENOPOLICY
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Er= rno::ENOPROTOOPT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::E= NOSPC
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOSR
=C2= =A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOSTR
=C2=A0 =C2=A0 = | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOSYS
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Errno::ENOTBLK
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Errno::ENOTCONN
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 = =C2=A0|- Errno::ENOTDIR
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- E= rrno::ENOTEMPTY
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EN= OTRECOVERABLE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOT= SOCK
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOTSUP
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENOTTY
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ENXIO
=C2=A0 =C2=A0 | =C2=A0= =C2=A0| =C2=A0 =C2=A0|- Errno::EOPNOTSUPP
=C2=A0 =C2=A0 | =C2=A0 =C2=A0= | =C2=A0 =C2=A0|- Errno::EOVERFLOW
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0= =C2=A0|- Errno::EOWNERDEAD
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0= |- Errno::EPERM
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EP= FNOSUPPORT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPIPE=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPROCLIM
=C2=A0 = =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPROCUNAVAIL
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPROGMISMATCH
=C2=A0 =C2=A0 = | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPROGUNAVAIL
=C2=A0 =C2=A0 | =C2= =A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EPROTO
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|= =C2=A0 =C2=A0|- Errno::EPROTONOSUPPORT
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| = =C2=A0 =C2=A0|- Errno::EPROTOTYPE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 = =C2=A0|- Errno::EPWROFF
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- E= rrno::ERANGE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EREMO= TE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EROFS
=C2=A0= =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ERPCMISMATCH
=C2=A0 =C2= =A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ESHLIBVERS
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ESHUTDOWN
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Errno::ESOCKTNOSUPPORT
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Errno::ESPIPE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0|- Errno::ESRCH
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|-= Errno::ESTALE
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ETI= ME
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ETIMEDOUT
= =C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ETOOMANYREFS
=C2= =A0 =C2=A0 | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::ETXTBSY
=C2=A0 =C2=A0= | =C2=A0 =C2=A0| =C2=A0 =C2=A0|- Errno::EUSERS
=C2=A0 =C2=A0 | =C2=A0 = =C2=A0| =C2=A0 =C2=A0|- Errno::EXDEV
=C2=A0 =C2=A0 | =C2=A0 =C2=A0| =C2= =A0 =C2=A0`- Errno::NOERROR
=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- ThreadError<= br>=C2=A0 =C2=A0 | =C2=A0 =C2=A0|- TypeError
=C2=A0 =C2=A0 | =C2=A0 =C2= =A0`- ZeroDivisionError
=C2=A0 =C2=A0 |- SystemExit
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0`- Gem::SystemExitException
=C2=A0 =C2=A0 |- SystemStackErr= or
=C2=A0 =C2=A0 `- fatal

-a
On Tue, O= ct 29, 2024 at 8:48=E2=80=AFAM Rodrigo Rosenfeld Rosas via ruby-core <ruby-core@ml.= ruby-lang.org> wrote:
Hello, I couldn't find any documentation = about the subject, so I thought this behavior should be probably documented= .

Given the following code:

def raise_error
=C2=A0 ra= ise "runtime error message"
rescue =3D> e
=C2=A0 "S= tandardError: #{e.message}"
rescue RuntimeError =3D> e
=C2=A0= puts "RuntimeError raised: #{e.message}"
=C2=A0 raise Standar= dError, "standard error message"
end

# same, but the or= der of the rescue blocks are inverted
def raise_error2
=C2=A0 raise &= quot;runtime error message"
rescue RuntimeError =3D> e
=C2=A0= puts "RuntimeError raised: #{e.message}"
=C2=A0 raise Standar= dError, "standard error message"
rescue =3D> e
=C2=A0 &q= uot;StandardError: #{e.message}"
end

p ["raise_error&qu= ot;, raise_error ]

begin
=C2=A0 p ["raise_error2", rais= e_error2]
rescue =3D> e
=C2=A0 puts "raise_error2 raised: #{e= .message}"
end

When we run it, this is the output in Ruby 3.= 3.5:

["rais= e_error", "StandardError: runtime error message"]

=

RuntimeError raised: runtim= e error message

raise_error2 raised: standard err= or message


In the firs= t case (raise_error), the code raised from the RuntimeError rescue block is= rescued by the StandardError block, but when inverting the order of the re= scue blocks (raise_error2) then this won't happen.

Is this part = of the specs? Is this behavior documented somewhere? Could this behavior di= ffer in different Ruby implementations and versions? Or can we rely on such= behavior?


This chapter doesn't include such case in its ex= amples:

https://ruby-doc.com/docs/ProgrammingR= uby/html/tut_exceptions.html

Or this documentation about Excepti= ons:

https://ruby-doc.org/3.3.5/syntax/exceptions_rdoc.htm= l

Is there a recommended way for wrapping exceptions into a part= icular one and then handling that exception from within the same method res= cue blocks? Or is this considered a bad practice?


=C2=A0______________________________________________
=C2=A0ruby-core mailing list -- ruby-core@ml.ruby-lang.org
=C2=A0To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
=C2=A0ruby-core info -- https://m= l.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
=


--
--000000000000d503280625a280a2-- --===============0106496388423345672== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/ --===============0106496388423345672==--