Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
`-> somewhere( -> divertTarget ) -> somewhereElse( -> anotherTarget, -> yetAnother )`

* Quit never completes if it has to go through a project save dialog (even when not saving)
* When inklecate crashes, we should handle it specially
* (DONE?) When inklecate crashes, we should handle it specially
* Replaying a story goes through a transition for the last turn
* jquery still fades in the last chunk even though it's a replay
* should force the view height never to get smaller despite temporary content reduction
Expand Down
1 change: 1 addition & 0 deletions app/main-process/inklecate.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function play(compileInstruction, requester, sessionId) {
playProcess.stderr.setEncoding('utf8');
playProcess.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
requester.send('play-story-unexpected-error', data, sessionId);
});

playProcess.stdin.setEncoding('utf8');
Expand Down
4 changes: 4 additions & 0 deletions app/renderer/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ LiveCompiler.setEvents({
},
unexpectedExit: () => {
PlayerView.addTerminatingMessage("Story exited unexpectedly", "error");
},
unexpectedError: (error) => {
PlayerView.addTerminatingMessage("Story exited unexpectedly", "error");
PlayerView.addTerminatingMessage(error, "error");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if I'm supposed to call the addTerminatingMessage twice in there but seems to work well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't parse or do anything with the error message, it just goes straight into the player view

}
});

Expand Down
8 changes: 8 additions & 0 deletions app/renderer/liveCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ ipc.on("play-story-unexpected-exit", (event, fromSessionId) => {
events.unexpectedExit();
});

ipc.on("play-story-unexpected-error", (event, error, fromSessionId) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to create a new message type but let me know if you prefer to change play-story-unexpected-exit instead


if( sessionId != fromSessionId )
return;

events.unexpectedError(error);
});

ipc.on("play-story-stopped", (event, fromSessionId) => {

});
Expand Down