Skip to content

Commit

Permalink
improving error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Apr 4, 2023
1 parent a1c6594 commit 3990c46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function addIdentifierToAsset(dir: string, networkCode: string, add
const assetInfoFilePath = path.join(dir, getDirPathForTokenlist(networkCode, address), 'info.json');

if(!fs.existsSync(assetInfoFilePath)) {
console.error('addIdentifierToAsset Cannot find asset info file for asset ' + address + ' in directory ' + dir);
console.error('addIdentifierToAsset Cannot find asset info file for asset ' + address + ' in location ' + assetInfoFilePath);
return { addedIdentifier: false };
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function readAndParseJson(file: string): any {
try {
return JSON.parse(fs.readFileSync(file, 'utf8'));
} catch (err) {
console.error('readAndParseJson Error on file: ', file);
throw err;
}
}
Expand Down

0 comments on commit 3990c46

Please sign in to comment.