Skip to content

Commit

Permalink
Error handling connection process.
Browse files Browse the repository at this point in the history
  • Loading branch information
jg committed Jun 1, 2017
1 parent a65545f commit 955f35b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lib/interactive/mixer-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,30 @@ function mixerConnect(){
// Make game ready
// Make banned scene
makeAllScenes()
.catch(() => renderWindow.webContents.send('error', "Error creating scenes."))
.catch(() => {
renderWindow.webContents.send('error', "Error creating scenes on Mixer.")
return;
})
.then((res) => makeNewScene('banned') )
.catch(() => renderWindow.webContents.send('error', "Error creating the banned usergroup scene.") )
.catch(() => {
renderWindow.webContents.send('error', "Error creating the banned usergroup scene.")
return;
})
.then((res) => makeAllGroups() )
.catch(() => renderWindow.webContents.send('error', "Error creating groups."))
.catch(() => {
renderWindow.webContents.send('error', "Error creating groups on Mixer.")
return;
})
.then((res) => {
mixerClient.ready(true)
Chat.connect()
renderWindow.webContents.send('connection', "Online")
Grouper.startQueue();
})
.catch(() => renderWindow.webContents.send('error', "Error connecting to chat and finalizing interactive board.") )
.catch(() => {
renderWindow.webContents.send('error', "Error connecting to chat and finalizing interactive board.")
return;
})


console.log('Interactive Connected');
Expand Down

0 comments on commit 955f35b

Please sign in to comment.