Unchecked Exceptions: Can the Programmer be Trusted to Document Exceptions?

نویسندگان

  • Paulo Sacramento
  • Bruno Cabral
  • Paulo Marques
چکیده

The emergence of exception handling mechanisms in modern programming languages made available a different way of communicating errors between procedures. For years, programmers trusted in the correct documentation for error codes returned by procedures to correctly handle erroneous situations. Now, they have to focus on the documentation of exceptions for the same effect. But to which extent can exception documentation be trusted? Moreover, is there enough documentation for exceptions? And in which way do these questions relate to the checked vs. unchecked exceptions discussion? For a given set of Microsoft .NET applications, code and documentation were thoroughly parsed and compared. This showed that exception documentation tends to be scarce and of poor quality when existent. In particular, it showed that 90% of exceptions are undocumented. Furthermore, programmers were demonstrated to be keener to document exceptions they explicitly throw while typically leaving exceptions resulting from method calls undocumented. These results are a contribution to the assessment of the effectiveness of the unchecked exceptions approach.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Unchecked Exceptions Can Be Strictly More Powerful Than Call/CC

We demonstrate that in the context of statically-typed purely-functional lambda calculi without recursion, unchecked exceptions (e.g., SML exceptions) can be strictly more powerful than call/cc. More precisely, we prove that a natural extension of the simply-typed lambda calculus with unchecked exceptions is strictly more powerful than all known sound extensions of Girard’s Fω (a superset of th...

متن کامل

Sound reasoning about unchecked exceptions: soundness proof

In this note we formalize a multithreaded Java-like programming language with unchecked exceptions, try-catch blocks, and synchronized blocks, as well as method contracts, object invariants, block invariants, thread-local objects, and parallel execution statements. We further formalize our verification condition generation-based modular static verification approach that verifies that the progra...

متن کامل

معیارهای بهینه‌سازی مقررات محدودیت‌ها و استثنائات در نظام حقوق مالکیت ادبی و هنری

The limitations and exceptions on the copyright and related rights is one of the most challenging and interesting issues of intellectual property rights and legislated with the aim of understanding of the public interest in the legal system. These limitations and exceptions has different categories such as library use, educational use, and so on, but as their implementation, there is the nee...

متن کامل

Strong exception-safety for checked and unchecked exceptions

Exception-safety strong guarantee: The operation has either completed successfully or thrown an exception, leaving the program state exactly as it was before the operation started.” David Abrahams [Abr00] The above definition of strong exception-safety comes from the world of C++, but it can be applied to any language. Because the exception-safety strong guarantee plays a central role in easing...

متن کامل

Implicit Flows: Can't Live with 'Em, Can't Live without 'Em

Verifying that programs trusted to enforce security actually do so is a practical concern for programmers and administrators. However, there is a disconnect between the kinds of tools that have been successfully applied to real software systems (such as taint mode in Perl and Ruby), and information-flow compilers that enforce a variant of the stronger security property of noninterference. Tools...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006