diff options
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
2 files changed, 11 insertions, 3 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java index 1e8db610..8f1b1f9b 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; import at.asit.pdfover.gui.exceptions.InvalidPortException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper; import at.asit.pdfover.signator.BKUs; @@ -153,8 +154,12 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { if(number == null || number.trim().equals("")) { //$NON-NLS-1$ this.mobileNumber = null; return; - } - this.mobileNumber = ATrustHelper.normalizeMobileNumber(number); + } + try { + this.mobileNumber = ATrustHelper.normalizeMobileNumber(number); + } catch (InvalidNumberException e) { + throw new InvalidNumberException(Messages.getString("error.InvalidPhoneNumber")); //$NON-NLS-1$ + } } diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 6c3265bc..93ccddce 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -100,9 +100,12 @@ public class PositioningState extends State { // FIXME this.positionComposite = null; log.error("Failed to display PDF document", e); //$NON-NLS-1$ + String message = e.getLocalizedMessage(); + if (message == null) + message = Messages.getString("error.IOError"); //$NON-NLS-1$ ErrorDialog dialog = new ErrorDialog( this.stateMachine.getGUIProvider().getMainShell(), - e.getLocalizedMessage(), BUTTONS.RETRY_CANCEL); + message, BUTTONS.RETRY_CANCEL); if(dialog.open() == SWT.RETRY) { this.stateMachine.update(); } else { |