mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Adding missing error cause messages.
This commit is contained in:
parent
29ff029b07
commit
5feaff130f
@ -26,7 +26,7 @@ class BackendInfo {
|
||||
try {
|
||||
this.gitCommitHash = fs.readFileSync('../.git/refs/heads/master').toString().trim();
|
||||
} catch (e) {
|
||||
logger.err('Could not load git commit info, skipping.');
|
||||
logger.err('Could not load git commit info: ' + e.message || e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Bisq {
|
||||
this.buildIndex();
|
||||
this.calculateStats();
|
||||
} catch (e) {
|
||||
logger.err('loadBisqDumpFile() error.' + e.message);
|
||||
logger.err('loadBisqDumpFile() error.' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ class Bisq {
|
||||
logger.debug('Bisq market data updated in ' + time + ' ms');
|
||||
}
|
||||
} catch (e) {
|
||||
logger.err('loadBisqMarketDataDumpFile() error.' + e.message);
|
||||
logger.err('loadBisqMarketDataDumpFile() error.' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class DiskCache {
|
||||
}));
|
||||
logger.debug('Mempool and blocks data saved to disk cache');
|
||||
} catch (e) {
|
||||
logger.warn('Error writing to cache file asynchronously');
|
||||
logger.warn('Error writing to cache file asynchronously: ' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ class Donations {
|
||||
connection.release();
|
||||
return rows;
|
||||
} catch (e) {
|
||||
logger.err('$getDonationsFromDatabase() error' + e);
|
||||
logger.err('$getDonationsFromDatabase() error: ' + e.message || e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class Donations {
|
||||
connection.release();
|
||||
return rows;
|
||||
} catch (e) {
|
||||
logger.err('$getLegacyDonations() error' + e);
|
||||
logger.err('$getLegacyDonations() error' + e.message || e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@ -159,7 +159,7 @@ class Donations {
|
||||
const [result]: any = await connection.query(query, params);
|
||||
connection.release();
|
||||
} catch (e) {
|
||||
logger.err('$addDonationToDatabase() error' + e);
|
||||
logger.err('$addDonationToDatabase() error' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ class Donations {
|
||||
const [result]: any = await connection.query(query, params);
|
||||
connection.release();
|
||||
} catch (e) {
|
||||
logger.err('$updateDonation() error' + e);
|
||||
logger.err('$updateDonation() error' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ class Statistics {
|
||||
connection.release();
|
||||
return result.insertId;
|
||||
} catch (e) {
|
||||
logger.err('$create() error' + e);
|
||||
logger.err('$create() error' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ class Statistics {
|
||||
return this.mapStatisticToOptimizedStatistic([rows[0]])[0];
|
||||
}
|
||||
} catch (e) {
|
||||
logger.err('$list2H() error' + e);
|
||||
logger.err('$list2H() error' + e.message || e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ class Statistics {
|
||||
connection.release();
|
||||
return this.mapStatisticToOptimizedStatistic(rows);
|
||||
} catch (e) {
|
||||
logger.err('$list2H() error' + e);
|
||||
logger.err('$list2H() error' + e.message || e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@ -317,6 +317,7 @@ class Statistics {
|
||||
connection.release();
|
||||
return this.mapStatisticToOptimizedStatistic(rows);
|
||||
} catch (e) {
|
||||
logger.err('$list24h() error' + e.message || e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class WebsocketHandler {
|
||||
client.send(JSON.stringify(response));
|
||||
}
|
||||
} catch (e) {
|
||||
logger.err('Error parsing websocket message: ' + e);
|
||||
logger.err('Error parsing websocket message: ' + e.message || e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -20,7 +20,7 @@ export async function checkDbConnection() {
|
||||
logger.info('Database connection established.');
|
||||
connection.release();
|
||||
} catch (e) {
|
||||
logger.err('Could not connect to database.');
|
||||
logger.err('Could not connect to database: ' + e.message || e);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user