ferrum-db-client
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -53,7 +53,5 @@ "use strict"; | ||
socket.once("error", (e) => { | ||
console.error(e); | ||
reject(e); | ||
}); | ||
socket.once("timeout", () => { | ||
console.error("Connection timeout"); | ||
reject(new Error("Connection timeout")); | ||
@@ -488,3 +486,2 @@ }); | ||
const len = br.readInt(); | ||
console.log(`${key} read ${len} bytes from DB`); | ||
try { | ||
@@ -532,4 +529,3 @@ const result = Buffer.from(br.readBytes(len)); | ||
catch (e) { | ||
console.error(`Failed to get ${key} from ${this.indexKey}`); | ||
throw e; | ||
throw new Error(`Failed to get ${key} from ${this.indexKey} \n\nCaused by: ${e}`); | ||
} | ||
@@ -536,0 +532,0 @@ } |
{ | ||
"name": "ferrum-db-client", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/client.js", | ||
@@ -5,0 +5,0 @@ "typings": "dist/client.d.ts", |
@@ -65,3 +65,2 @@ import { Socket } from "net"; | ||
socket.once("error", (e) => { | ||
console.error(e); | ||
reject(e); | ||
@@ -71,3 +70,2 @@ }); | ||
socket.once("timeout", () => { | ||
console.error("Connection timeout"); | ||
reject(new Error("Connection timeout")); | ||
@@ -669,3 +667,2 @@ }); | ||
const len = br.readInt(); | ||
console.log(`${key} read ${len} bytes from DB`); | ||
try { | ||
@@ -716,4 +713,5 @@ const result = Buffer.from(br.readBytes(len)); | ||
} catch (e) { | ||
console.error(`Failed to get ${key} from ${this.indexKey}`); | ||
throw e; | ||
throw new Error( | ||
`Failed to get ${key} from ${this.indexKey} \n\nCaused by: ${e}` | ||
); | ||
} | ||
@@ -720,0 +718,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
119063
1605