added logging when examples fail

When examples throw exceptions, log them.