Skip to content

Commit 20a4856

Browse files
Keavon0HyperCube
authored andcommitted
Add an intentional panic for debug
1 parent a703c2f commit 20a4856

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

editor/src/document/document_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ impl MessageHandler<DocumentMessage, &InputPreprocessor> for DocumentMessageHand
552552
})
553553
.flatten(),
554554
);
555-
log::debug!("LayerPanel: {:?}", self.layer_data.keys());
555+
// log::debug!("LayerPanel: {:?}", self.layer_data.keys());
556556
}
557557
Err(e) => log::error!("DocumentError: {:?}", e),
558558
Ok(_) => (),

frontend/src/components/widgets/inputs/MenuBarInput.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ const menuEntries: MenuListEntries = [
161161
{ label: "Graphite License", action: () => window.open("https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/LICENSE.txt", "_blank") },
162162
{ label: "Third-Party Licenses", action: () => window.open("/third-party-licenses.txt", "_blank") },
163163
],
164+
[{ label: "Debug: Panic (DANGER)", action: async () => (await wasm).intentional_panic() }],
164165
],
165166
},
166167
];

frontend/wasm/src/api.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ use editor::LayerId;
1414
use editor::{message_prelude::*, Color};
1515
use wasm_bindgen::prelude::*;
1616

17+
/// Intentionally panic for testing purposes
18+
#[wasm_bindgen]
19+
pub fn intentional_panic() {
20+
panic!();
21+
}
22+
1723
/// Modify the currently selected tool in the document state store
1824
#[wasm_bindgen]
1925
pub fn select_tool(tool: String) -> Result<(), JsValue> {

0 commit comments

Comments
 (0)