1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Improve documentation of eframe, especially for wasm32 (#3295)

* Improve documentation of `eframe`, especially for wasm32

* remove dead code

* fix
This commit is contained in:
Emil Ernerfeldt
2023-09-04 09:55:47 +02:00
committed by GitHub
parent 209cbeb030
commit 5f742b9aba
12 changed files with 69 additions and 61 deletions

View File

@@ -65,16 +65,19 @@ pub struct PanicSummary {
}
impl PanicSummary {
/// Construct a summary from a panic.
pub fn new(info: &std::panic::PanicInfo<'_>) -> Self {
let message = info.to_string();
let callstack = Error::new().stack();
Self { message, callstack }
}
/// The panic message.
pub fn message(&self) -> String {
self.message.clone()
}
/// The backtrace.
pub fn callstack(&self) -> String {
self.callstack.clone()
}