Improve error handling for list-contributors script

This commit is contained in:
2019-04-24 13:46:27 +01:00
parent 359989f235
commit 6b2ac15f56

View File

@@ -21,10 +21,6 @@ module.exports = async function(callback) {
try { try {
const contributors = await kredits.Contributor.all() const contributors = await kredits.Contributor.all()
} catch(e) {
callback(e);
return;
}
contributors.forEach((c) => { contributors.forEach((c) => {
table.push([ table.push([
@@ -38,6 +34,10 @@ module.exports = async function(callback) {
c.ipfsHash c.ipfsHash
]) ])
}) })
} catch(e) {
callback(e);
return;
}
console.log(table.toString()) console.log(table.toString())