Un atelier Ruby · Édition d'ApprentissageA Ruby Workshop · Learning Edition

Concevoir sa hiérarchie, ou StandardError jamais Exception Designing your hierarchy, or StandardError never Exception

Les exceptions forment un arbre où une frontière commande tout : StandardError (le rattrapable, et tes erreurs) sous Exception (qui contient aussi les signaux). Hérite de StandardError, rattrape StandardError, jamais Exception — sinon on avale le Ctrl-C. Et bannis le rescue fourre-tout qui rend nil. Exceptions form a tree where one boundary commands everything: StandardError (the rescuable, and your errors) under Exception (which also holds the signals). Inherit from StandardError, rescue StandardError, never Exception — or you swallow Ctrl-C. And ban the catch-all rescue that returns nil.

AudienceAudience
Dev qui veut des erreurs qui parlent, et un rescue qui ne ment pas Dev who wants errors that speak, and a rescue that doesn't lie
Format
Self-paced
ChapitresChapters
5
Date
Mai 2026 May 2026
≈ 18 min ●●●○ StandardErrorHiérarchieException
🔒

La suite est réservée The rest is members-only

Le premier numéro est libre. Débloque tout The Ruby Loop — tous les volumes, à vie — pour 5 €, paiement unique. The first issue is free. Unlock all of The Ruby Loop — every volume, forever — for €5, one-time.

Retour au kiosqueBack to newsstand