GoConqr has a new look! Let us know what you think.

Mind map

Error Handling

jocyroman Spanish

Map content

Error Handling

  1. all the programmers should do it

    • making sure that our code does what it needs to do
  2. it's important, but if it obscures logic, it's wrong

  3. Use exceptions rather than return codes

    • It's better to throw an exception when you encounter an error
  4. write your try-catch-finally statement first

    • exceptions define a scope within your program
      • catch has to leave your program in a consistent state
  5. Use unchecked exceptions

    • checked exceptions aren't necessary for the production of robust software
      • the changed modules must be rebult and redeployed
  6. provide context with exceptions

    • exceptions should provide context to determine the source and location of an error
      • create informative error messages
        • mention the operation that failed and the type of failure
  7. define exception classes in terms of a caller's needs

    • classify them by how they are caught
  8. define the normal flow

    • special case pattern
      • create a class or configure an object so that it handless a special case
        • the client code doesn't deal with the exception, the behavior is encapsulated in the special case object
  9. don't return null, but don't pass null

Information

Description
Mind Map on Error Handling, created by jocyroman on 09/11/2015.
Created by
jocyroman
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?