Added a little flexibility to ErrorDialog.