Erlang (programming language)/Tutorials/otp design

From Citizendium
< Erlang (programming language)‎ | Tutorials
Revision as of 12:15, 22 July 2009 by imported>Eric Evers
Jump to navigation Jump to search

Fail early and often

Fail early and often is a strange and unusual programming method used in OTP. Processes are programed to a specification about how to handle good input. If bad input is seen by a worker process we let the process crash. The supervisor restarts the process and the bad input is ignored. Fail early and often works well with any type of data flow situation when a program is processing a flow of messages. Logically, security and stability is increased by limiting the propagation of errors to other processes.