book-exceptional-ruby-notes

consider passing a block from the caller that handles exceptional behavior (placing the onus on the caller to handle the exception in a special way)

a bulkhead separates a ship into sections so a hull breach in one section won't necessarily sink the boat. You can do the same using exception handling.

Circuit Breaker pattern from "Release It" book

sideband data can be multiple return values or a singular return value object with multiple methods that it can ask questions of

result, error_message = some_method()

hash.fetch(:some_key) { DEFAULT_VALUE }

Have a singular failure handling section of the method (at the end) kinda like in pattern-input-work-result-failure

You can try to match an exception by the message it provides if not by class

Always namespace your exceptions if you're doing a library

Exception testing on each method call (Avdi created a library for it)

Consider using warn instead of $STDERR.puts

People

person-avdi-grimm