Chapter4 Example8: formatted custom exception