Use format to cast exceptions to strings