Perl Best Practices [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Best Practices [Electronic resources] - نسخه متنی

Damian Conway

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







B.12. Chapter 13, Error Handling


  • Throw exceptions instead of returning special values or setting flags. [Exceptions ]

  • Make failed builtins throw exceptions too. [Builtin Failures ]

  • Make failures fatal in all contexts. [Contextual Failure ]

  • Be careful when testing for failure of the system builtin. [Systemic Failure ]

  • Throw exceptions on all failures, including recoverable ones. [Recoverable Failure ]

  • Have exceptions report from the caller's location, not from the place where they were thrown. [Reporting Failure ]

  • Compose error messages in the recipient's dialect. [Error Messages ]

  • Document every error message in the recipient's dialect. [Documenting Errors ]

  • Use exception objects whenever failure data needs to be conveyed to a handler. [OO Exceptions ]

  • Use exception objects when error messages may change. [Volatile Error Messages ]

  • Use exception objects when two or more exceptions are related. [Exception Hierarchies ]

  • Catch exception objects in most-derived-first order. [Processing Exceptions ]

  • Build exception classes automatically. [Exception Classes ]

  • Unpack the exception variable in extended exception handlers. [Unpacking Exceptions ]



/ 317