Commit 4b2524f4 authored by mercury233's avatar mercury233

log create room fail

parent fcc51840
......@@ -1193,6 +1193,7 @@ class Room
@process = spawn './ygopro', param, {cwd: 'ygopro'}
@process_pid = @process.pid
@process.on 'error', (err)=>
log.warn 'CREATE ROOM ERROR', err
_.each @players, (player)->
ygopro.stoc_die(player, "${create_room_failed}")
this.delete()
......@@ -1229,7 +1230,8 @@ class Room
@send_replays()
@process.kill()
return
catch
catch e
log.warn 'CREATE ROOM FAIL', e
@error = "${create_room_failed}"
delete: ->
return if @deleted
......
......@@ -1573,6 +1573,7 @@
});
this.process_pid = this.process.pid;
this.process.on('error', (err) => {
log.warn('CREATE ROOM ERROR', err);
_.each(this.players, function(player) {
return ygopro.stoc_die(player, "${create_room_failed}");
});
......@@ -1622,6 +1623,8 @@
}
});
} catch (error1) {
e = error1;
log.warn('CREATE ROOM FAIL', e);
this.error = "${create_room_failed}";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment