GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Error Handling

jocyroman Spanisch

Inhalt der Mindmap

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

Informationen

Beschreibung
Mindmap am Error Handling, erstellt von jocyroman am 09/11/2015.
Erstellt von
jocyroman
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck