コード例 #1
0
ファイル: plugin.cpp プロジェクト: FarManagerLegacy/farplug
void error_dlg(const std::exception& e) {
  UnicodeString msg;
  msg.add(far_get_msg(MSG_PLUGIN_NAME)).add('\n');
  UnicodeString err_msg = word_wrap(oem_to_unicode(e.what()), get_msg_width());
  if (err_msg.size() != 0) msg.add(err_msg).add('\n');
  msg.add_fmt(L"v.%u.%u.%u.%u"PLUGIN_TYPE, g_version.major, g_version.minor, g_version.patch, g_version.revision);
  far_message(c_error_dialog_guid, msg, 0, FMSG_WARNING | FMSG_MB_OK);
}
コード例 #2
0
ファイル: plugin.cpp プロジェクト: FarManagerLegacy/farplug
void error_dlg(CustomError& e) {
  UnicodeString msg;
  msg.add(far_get_msg(MSG_PLUGIN_NAME)).add('\n');
  if (e.object().size() != 0) msg.add(fit_str(e.object(), get_msg_width())).add('\n');
  if (e.message().size() != 0) msg.add(word_wrap(e.message(), get_msg_width())).add('\n');
  msg.add_fmt(L"%S:%u v.%u.%u.%u.%u"PLUGIN_TYPE, &extract_file_name(oem_to_unicode(e.file)), e.line, g_version.major, g_version.minor, g_version.patch, g_version.revision);
  far_message(c_error_dialog_guid, msg, 0, FMSG_WARNING | FMSG_MB_OK);
}