+2
-32
lines changedFilter options
+2
-32
lines changed Original file line number Diff line number Diff line change
@@ -220,41 +220,11 @@ class FXGLDialogFactoryServiceProvider : DialogFactoryService() {
220
220
}
221
221
222
222
override fun errorDialog(errorMessage: String, callback: Runnable): Pane {
223
-
return messageDialog("Error occurred: $errorMessage", callback)
223
+
return errorDialog(RuntimeException(errorMessage), callback)
224
224
}
225
225
226
226
override fun errorDialog(error: Throwable, callback: Runnable): Pane {
227
-
val text = createMessage(error.toString())
228
-
229
-
val btnOK = uiFactory.newButton(localizedStringProperty("dialog.ok"))
230
-
btnOK.setOnAction {
231
-
callback.run()
232
-
}
233
-
234
-
val btnLog = uiFactory.newButton("LOG")
235
-
btnLog.setOnAction {
236
-
// val sw = StringWriter()
237
-
// val pw = PrintWriter(sw)
238
-
// error.printStackTrace(pw)
239
-
// pw.close()
240
-
//
241
-
// try {
242
-
// Files.write(Paths.get("LastException.log"), sw.toString().split("\n".toRegex()).dropLastWhile { it.isEmpty() })
243
-
// DialogSubState.showMessageBox("Log has been saved as LastException.log")
244
-
// } catch (ex: Exception) {
245
-
// DialogSubState.showMessageBox("Failed to save log file")
246
-
// }
247
-
248
-
callback.run()
249
-
}
250
-
251
-
val hbox = HBox(btnOK, btnLog)
252
-
hbox.alignment = Pos.CENTER
253
-
254
-
val vbox = VBox(50.0, text, hbox)
255
-
vbox.setAlignment(Pos.CENTER)
256
-
257
-
return wrap(vbox)
227
+
return messageDialog(error.toString(), callback)
258
228
}
259
229
260
230
override fun progressDialog(message: String, observable: ReadOnlyDoubleProperty, callback: Runnable): Pane {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4