mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 23:28:11 +08:00
Add an intentional panic for debug
This commit is contained in:
@@ -551,7 +551,7 @@ impl MessageHandler<DocumentMessage, &InputPreprocessor> for DocumentMessageHand
|
|||||||
})
|
})
|
||||||
.flatten(),
|
.flatten(),
|
||||||
);
|
);
|
||||||
log::debug!("LayerPanel: {:?}", self.layer_data.keys());
|
// log::debug!("LayerPanel: {:?}", self.layer_data.keys());
|
||||||
}
|
}
|
||||||
Err(e) => log::error!("DocumentError: {:?}", e),
|
Err(e) => log::error!("DocumentError: {:?}", e),
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ const menuEntries: MenuListEntries = [
|
|||||||
{ label: "Graphite License", action: () => window.open("https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/LICENSE.txt", "_blank") },
|
{ label: "Graphite License", action: () => window.open("https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/LICENSE.txt", "_blank") },
|
||||||
{ label: "Third-Party Licenses", action: () => window.open("/third-party-licenses.txt", "_blank") },
|
{ label: "Third-Party Licenses", action: () => window.open("/third-party-licenses.txt", "_blank") },
|
||||||
],
|
],
|
||||||
|
[{ label: "Debug: Panic (DANGER)", action: async () => (await wasm).intentional_panic() }],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ use editor::LayerId;
|
|||||||
use editor::{message_prelude::*, Color};
|
use editor::{message_prelude::*, Color};
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
|
/// Intentionally panic for testing purposes
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn intentional_panic() {
|
||||||
|
panic!();
|
||||||
|
}
|
||||||
|
|
||||||
/// Modify the currently selected tool in the document state store
|
/// Modify the currently selected tool in the document state store
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn select_tool(tool: String) -> Result<(), JsValue> {
|
pub fn select_tool(tool: String) -> Result<(), JsValue> {
|
||||||
|
|||||||
Reference in New Issue
Block a user