If you want to show an exception as error dialog, simply call

ExceptionHandler.show(new Exception("Expired"));

The command will show a simple dialog with a text area that contains the error message, a detail and an OK button.

The detail button will show the stack trace.