throw exceptions in all examples