Skip to content

Commit

Permalink
Move point of logging
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-robert committed Nov 18, 2024
1 parent abbcb49 commit 544e1e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/project-hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ export const ProjectProvider = ({
if (hasTimedOut) {
editorTimedOut();
logging.log("[MakeCode] Load timed out");
logging.event({
type: "makecode-load-failed",
});
throw new CodeEditorError("MakeCode load timed out");
}
} finally {
Expand Down Expand Up @@ -244,9 +247,6 @@ export const ProjectProvider = ({
});
} catch (e) {
if (e instanceof CodeEditorError) {
logging.event({
type: "makecode-load-failed",
});
openEditorTimedOutDialog();
}
}
Expand Down

0 comments on commit 544e1e6

Please sign in to comment.