Skip to content

cloudstreet-dev/Exceptionally-Unsafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exceptionally Unsafe

Exception safety, properly. And the same problem under a dozen other names.

Read online at cloudstreet-dev.github.io/Exceptionally-Unsafe

About This Book

Exceptions are invisible GOTOs to unguessable destinations. Most working engineers cannot precisely state the difference between the no-throw guarantee, the basic guarantee, and the strong guarantee — and most code that claims one provides another. This book fixes the vocabulary, shows the mechanics, and then drags the same problem out of every dark corner it likes to hide in: concurrent code, smart-contract reentrancy, signal handlers, kernel interrupts, database transactions, distributed sagas.

The reader is assumed to already know what try and catch look like. The book starts where most books stop.

Code in C++ where the language is the canonical battleground, with Java, Python, C#, Rust, Go, JavaScript, and Common Lisp where the language matters. Chapter 6 is Common Lisp — non-negotiable, because the condition system makes possible things try/catch cannot.

Table of Contents

Part I: The Mechanism

Part II: The Languages

Part III: Where The Problem Hides

Part IV: Practice

Building Locally

cargo install mdbook
mdbook serve --open

License

CC0 1.0 Universal — public domain dedication. Take it, fork it, ship it, claim it as your own. See LICENSE.

About

Exceptions are invisible GOTOs to unguessable destinations, and exception safety is one of the most under-taught problems in software. Most engineers can't tell the no-throw, basic, and strong guarantees apart. This book changes that — and shows why the same problem keeps reappearing in places that don't look like try/catch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors