本文整理汇总了Java中lotus.domino.NotesException.getLocalizedMessage方法的典型用法代码示例。如果您正苦于以下问题:Java NotesException.getLocalizedMessage方法的具体用法?Java NotesException.getLocalizedMessage怎么用?Java NotesException.getLocalizedMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lotus.domino.NotesException
的用法示例。
在下文中一共展示了NotesException.getLocalizedMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEffectiveUserName
import lotus.domino.NotesException; //导入方法依赖的package包/类
/**
* Method required to read username in constructor
*
* @param session session
* @return effective username
*/
private static String getEffectiveUserName(Session session) {
try {
return session.getEffectiveUserName();
} catch (NotesException e) {
throw new NotesError(e.id, e.getLocalizedMessage());
}
}
示例2: NotesDatabase
import lotus.domino.NotesException; //导入方法依赖的package包/类
/**
* Creates a new NotesDatabase
*
* @param adaptable adaptable providing enough information to create the database
*/
public NotesDatabase(IAdaptable adaptable) {
Database legacyDB = adaptable.getAdapter(Database.class);
if (legacyDB!=null) {
if (isRecycled(legacyDB))
throw new NotesError(0, "Legacy database already recycled");
long dbHandle = LegacyAPIUtils.getDBHandle(legacyDB);
if (dbHandle==0)
throw new NotesError(0, "Could not read db handle");
if (PlatformUtils.is64Bit()) {
m_hDB64 = dbHandle;
}
else {
m_hDB32 = (int) dbHandle;
}
NotesGC.__objectCreated(NotesDatabase.class, this);
setNoRecycleDb();
m_legacyDbRef = legacyDB;
Session session;
try {
session = legacyDB.getParent();
String effUserName = session.getEffectiveUserName();
m_asUserCanonical = effUserName;
List<String> names = NotesNamingUtils.getUserNamesList(m_asUserCanonical);
m_namesList = NotesNamingUtils.writeNewNamesList(names);
//setting authenticated flag for the user is required when running on the server
NotesNamingUtils.setPrivileges(m_namesList, EnumSet.of(Privileges.Authenticated));
} catch (NotesException e) {
throw new NotesError(e.id, e.getLocalizedMessage());
}
}
else {
throw new NotesError(0, "Unsupported adaptable parameter");
}
}