Error Handling User Interface
aspect of user interface and experience design that’s often pushed to the bottom of the priority list or overlooked altogether. After all, let’s face it - error handling isn’t very sexy especially compared to graphic design and other branding elements. Unfortunately giving short shrift to errors often examples of good error messages results in higher abandonment rates and lower conversion. In the first part of this two-part entry I’m friendly error messages examples going to review some best practices for displaying error messages. In part two we’ll get into the messaging itself. But first things first - let’s look at the importance of ensuring users actually notice when they’ve encountered a problem. Your attention please It happens more often than you might think, and I’ve seen it more times than I can count in user testing sessions. Users make a small mistake on a form or encounter a system error and simply don’t notice the resulting error message. This often leads to substantial frustration - for example a user trying again and again to submit a form or complete a transaction, unsuccessfully - until they finally give up. The biggest problems of this nature occur when: Error messages appear above or below the fold. The term "below the fold" comes from newspaper publishing, where printed newspapers are often folded in half, leaving major stories visible "above the fold" and less important stores "below the fold", requiring the reader to open the paper fully or flip the paper over to see them. For a website or application the term refers to the information that's visible when a scrolling page or screen first loads, before the user scrolls. If information is "below the fold" it means the user must scroll down to see it. This is a bigger problem in website design than application design, but it comes up in both. Suppose a user is interacting with a scrolling page (for example, a long form with a submit button at the bottom) and triggers an error condition. If the error is displayed in a location where it’s not immediately visible such as the very top or very bottom of the display, the user often won't see it. The user then wonders why he or she can’t move forward in the process - and often repeats the action that caused the error. Or in some cases the user scrolls up or down the page but still doesn’t see the message because they haven’t scrolled up or down far enough. Error messages don’t stand out. Often error messages are displayed within the user’s field of vision but fail to stand out, for example because they’re too small or are displayed in a manner that can't easily be differentiated from the rest of the display. So what’s to be done? It comes down to ensuring that e
application handles errors can have a big impact on user satisfaction and usability, and so error handling deserves close attention from user interface designers. Errors are unexpected or undesirable situations that prevent the normal operation of the application. We might classify errors by their general types and severities: The worst type of error is the unrecoverable crash, where the program abruptly stops due to a programming error that usually involves an unforeseen situation. Extensive http://completeusability.com/improved-error-handling-part-1-helping-users-notice-errors/ testing and careful code inspections can reduce but never completely eliminate the possibility of such cases in a complex system. Technical errors are programming errors that prevent some task or action from being completed, but do not crash the entire application. Transient technical errors are situations that arise that temporarily hinder proper operation, but http://architectingusability.com/2012/06/05/designing-error-handling-for-maximum-usability-in-your-application/ which can usually be corrected by taking actions outside of the application. For example, a database connection or network connection might be lost, a disk is full, etc. Data validation or rule violation errors are cases where the application has detected that the data does not meet some criteria for validity. The system cannot function correctly if the data remains in this state, and so the user is notified and the user is expected to correct the data. Warnings are cases where the application detects a situation that doesn't prevent operation but which may have consequences that the user might not want or expect. We should also note that if the system interacts with the real world, programming mistakes and invalid data can lead to "error-like situations" in the world. For instance, if your application prints out checks but the address on the check or envelope omits the postal code, they may not be deliverable by the postal system, and the
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business http://programmers.stackexchange.com/questions/147059/the-modern-way-to-perform-error-handling Learn more about hiring developers or posting ads with us Programmers Questions Tags Users Badges Unanswered Ask Question _ Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top The modern way error messages to perform error handling… up vote 104 down vote favorite 30 I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm hoping someone can produce a conclusion to the following: Favour exceptions over error codes As far as I'm aware, from working in the industry for four years, reading books and blogs, etc. the current best practice for handling errors is to throw exceptions, rather error handling user than returning error codes (not necessarily an error code, but a type representing an error). But - to me this seems to contradict... Coding to interfaces, not implementations We code to interfaces or abstractions to reduce coupling. We don't know, or want to know, the specific type and implementation of an interface. So how can we possibly know what exceptions we should be looking to catch? The implementation could throw 10 different exceptions, or it could throw none. When we catch an exception surely we're making assumptions about the implementation? Unless - the interface has... Exception specifications Some languages allow developers to state that certain methods throw certain exceptions (Java for example, uses the throws keyword.) From the calling code's point of view this seems fine - we know explicitly which exceptions we might need to catch. But - this seems to suggest a... Leaky abstraction Why should an interface specify which exceptions can be thrown? What if the implementation doesn't need to throw an exception, or needs to throw other exceptions? There's no way, at an interface level, to know which exceptions an implementation may want to throw. So... To conclude Why are exceptions preferred when they seem (in my eyes) to contradict software best practices? And, if error codes are so bad (and I don't need to