import org.tizen.common.core.command.ExecutionContext;
import org.tizen.common.sign.command.ReadSigningProfileFileCommand;
import org.tizen.common.sign.command.SignCommand;
+import org.tizen.common.sign.exception.CertificationException;
import org.tizen.common.sign.model.SignatureConstants;
import org.tizen.common.sign.preferences.Messages;
import org.tizen.common.sign.preferences.SigningProfile;
new ReadSigningProfileFileCommand(
SigningProfileUtil.getProfilesPath().toPortableString(),
getActiveProfileName() );
- CommonPlugin.getDefault().getExecutor().execute( readProfile );
+ try {
+ CommonPlugin.getDefault().getExecutor().execute( readProfile );
+ } catch( IllegalStateException e ) {
+ Throwable cause = e.getCause();
+
+ // convert the wrapped IllegalStateException to normal exception.
+ if ( cause instanceof CertificationException ) {
+ throw new IOException( cause.getMessage(), cause );
+ }
+
+ throw e;
+ }
profile = readProfile.getProfile();