What to do with errors?. At my work there’s often the discussion…

At my work there’s often the discussion of which errors to display to the users of our application. Naturally, users only want to see errors they understand and they can act on. But technically that is not so easy. The problem is that the code where the error occurs often has no idea of its overall impact of the application. It usually just passes the error and the responsibility to deal with it up the call stack. For example, if opening a file fails, the operating system only knows the technical reason and the name of the file, but only a higher level piece of application code would know if it is, for example, an incorrect file name entered by a user, which should be reported back or a missing system file, which is nothing a user could fix.

In complex applications with many components and subsystems and many sources of errors it is impractical for high level code to catch all possible conditions and try to make sense out of them for the user. So what to do? One of the major differences between Windows and MacOS is their bias on how to deal with those errors. Windows tends to display some either generic message (e.g. “Operation Failed”, “Unknown Error”) or something that only developers would understand. MacOS on the other side often displays nothing: it just doesn’t work. Which one is better? It depends, but — provided that the overall quality of the software can back it up — most people seem to agree that MacOS feels more user friendly. In fact, it was one of the cryptic error messages in Windows, that put me over the edge and I bought my first Mac.

Leave a Reply