MCPcopy
hub / github.com/ntfstool/ntfstool / noticeTheSystemError

Function noticeTheSystemError

src/common/utils/AlfwCommon.js:107–141  ·  view source on GitHub ↗
(_error, setOption)

Source from the content-addressed store, hash-verified

105 * @param setOption
106 */
107export function noticeTheSystemError(_error, setOption) {
108 var errorMap = {
109 system: 10000,
110 dialog: 10010,
111 dialog_save_err: 10011,
112 savePassword: 10020,
113 savePassword2: 10021,
114 getSudoPwdError: 10031,
115 checkSudoPasswordError: 10041,
116 opendevmod: 10030,
117 FEEDBACK_ERROR: 10040,
118 UNCLEANERROR:10050
119 };
120 var error = (typeof _error != "undefined") ? _error : "system";
121 console.warn(error, "error")
122 var errorNo = (typeof errorMap[error] != "undefined") ? errorMap[error] : 1000;
123 var option = {
124 title: "System Error: " + errorNo,
125 body: "please contact official technical support",
126 href: 'https://www.ntfstool.com'
127 };
128
129 if (typeof setOption == "object") {
130 option = setOption;
131 }
132 if (typeof setOption == "string") {
133 option.body = setOption;
134 }
135
136 saveLog.error({name: _error, text: JSON.stringify(option)}, "noticeTheSystemError");
137
138 new window.Notification(option.title, option).onclick = function () {
139 shell.openExternal(option.href)
140 }
141}
142
143/**
144 * disableZoom

Callers 5

checkSudoPwdFunction · 0.90
checkSudoPasswordFunction · 0.90
reMountNtfsFunction · 0.90
savePasswordFunction · 0.90
getSudoPwdFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected