Proxy proxy = context.getInteractionModel();
proxy.addListener(listener, true);
} catch (PolicyFileAccessException pfae) {
String errorMessage = file.exists() ? LOAD_ERROR_MESSAGE :
MISSING_FILE_MESSAGE;
throw new PartInitException(errorMessage);
} catch (NullPointerException npe) {
String errorMessage = file.exists() ? LOAD_ERROR_MESSAGE :
MISSING_FILE_MESSAGE;
throw new PartInitException(errorMessage);
}
}