Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Sequential Erlang > Handling Errors

3.6. Handling Errors

In the preceding section, you saw some of the errors that can occur in an Erlang system, together with diagnoses of the potential causes.

When executing an expression and a runtime error occurs, you might want to catch the exception and prevent the thread of execution from terminating. Alternatively, you might want to let it fail and for some other part of the system deal with recovery: this latter option, which involves process linking and supervision, will be covered in Chapters Chapter 6 and Chapter 12. In the meantime, in this section we will discuss how errors can be caught and handled, using the try ... catch construct.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial