Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phfaist committed Nov 22, 2023
1 parent d257852 commit 1fd1ce4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _zoodb_citations_cache/cache_compiled_citations.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _zoodb_citations_cache/cache_downloaded_info.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions eczoodb/eczoodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ export class EcZooDb extends ZooDb
async validate()
{
// Check that there are no cycles in parent-child relationships.

// eslint-disable-next-line no-unused-vars
let all_parent_child_sorted_codes = this.code_parent_child_sort(
Object.values(this.objects.code)
);
Expand Down
25 changes: 23 additions & 2 deletions site/site_data/eczoodb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@

let cached_eczoodb = null;


function get_error_string(err)
{
let errstr = null;
try {
if (err && err.__class__ != null) {
if (err.args) {
errstr = `${err.__class__.__name__}: ${err.args}`;
} else {
errstr = `${err.__class__.__name__} (no information)`;
}
} else {
errstr = ''+err;
}
} catch (tostrerr) {
errstr = Object.toString(err);
}
return errstr;
}


module.exports = async (configData) => {

const eczoo_config = configData.eczoo_config;
Expand Down Expand Up @@ -35,8 +56,8 @@ module.exports = async (configData) => {
cached_eczoodb.install_zoo_loader_handler(loader_handler);

} catch (err) {
console.error(`ERROR INITIALIZING ZOO: ${get_error_string(err)}`);
console.error(err);
console.error(`ERROR INITIALIZING ZOO: ${err}`);
throw err;
}
}
Expand All @@ -46,7 +67,7 @@ module.exports = async (configData) => {
await cached_eczoodb.load();

} catch (err) {
console.error(`ERROR LOADING ZOO [eczoodb.js]:`);
console.error(`ERROR LOADING ZOO [site/site_data/eczoodb.js]: ${get_error_string(err)}`);
console.error(err);
throw err;
}
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ __metadata:

"@phfaist/zoodb@https://github.com/phfaist/zoodb.git#main":
version: 0.1.1
resolution: "@phfaist/zoodb@https://github.com/phfaist/zoodb.git#commit=4b73b10a1116e4343020146203e25b88fe14288b"
resolution: "@phfaist/zoodb@https://github.com/phfaist/zoodb.git#commit=7095e22bff35dda56a223b0d18afcd266caad7c0"
dependencies:
"@apidevtools/json-schema-ref-parser": ^10.1.0
base32-encode: ^2.0.0
Expand All @@ -1918,7 +1918,7 @@ __metadata:
stream-parser: ^0.3.1
tippy.js: ^6.3.7
url: ^0.11.0
checksum: 17dc7df482ff9d19ed35a9f4b6dc7fd6cdb98677c8bda89aa229d6d3c3872da8c08e59fe17927465f61876fa65c0fce748cce45bb9b255775529759dbd71199d
checksum: 75169962b87489405f11f8dcd5994252dc574d26f2d4a0e105d4acd8db716c6e643a85e7bc44f5a4e681392d4f1c07907e6ffd48b89435d269a12ca95e0d3c0f
languageName: node
linkType: hard

Expand Down

0 comments on commit 1fd1ce4

Please sign in to comment.