0
我有這樣的代碼:如何在nodeJS中捕獲錯誤?
try {
var client = new Steam.SteamClient();
client.logOn(credentials);
} catch(err) {
console.log(err);
return;
}
但仍然無法捕獲的錯誤:
MacBook-Pro:steam $ node test.js
\events.js:85
throw er; // Unhandled 'error' event
^
Error: Logon fail: 63
at SteamClient.handlers.(anonymous function) (/Users/Sites/steam/node_modules/steam/lib/handlers/user.js:178:11)
at SteamClient._netMsgReceived (/Users/Sites/steam/node_modules/steam/lib/steam_client.js:106:26)
at SteamClient.handlers.(anonymous function) (/Users/Sites/steam/node_modules/steam/lib/steam_client.js:192:10)
at SteamClient._netMsgReceived (/Users/Sites/steam/node_modules/steam/lib/steam_client.js:106:26)
at Connection.emit (events.js:107:17)
at Connection._readPacket (/Users/Sites/steam/node_modules/steam/lib/connection.js:50:8)
at Connection.emit (events.js:104:17)
at emitReadable_ (_stream_readable.js:424:10)
at emitReadable (_stream_readable.js:418:7)
at readableAddChunk (_stream_readable.js:174:11)
的問題是,我有ACC的列表,只需要那些權威性,這是好的。但在這個錯誤程序關閉。