Skip to content

Commit

Permalink
Merge pull request #155 from hed-standard/bids-internal-errors
Browse files Browse the repository at this point in the history
Add dataset_description.json as file for certain internal errors
  • Loading branch information
happy5214 authored Jun 14, 2024
2 parents 5b90255 + 639e19c commit 8f17c4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bids/types/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export class BidsIssue {
return issues.some((issue) => issue.isError())
}

static generateInternalErrorPromise(error) {
return Promise.resolve([new BidsIssue(106, null, error.message)])
static generateInternalErrorPromise(error, errorFile) {
return Promise.resolve([new BidsIssue(106, errorFile, error.message)])
}
}

Expand Down
2 changes: 1 addition & 1 deletion bids/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function validateBidsDataset(dataset, schemaDefinition) {
try {
return validator.validateFullDataset()
} catch (internalError) {
return BidsIssue.generateInternalErrorPromise(internalError)
return BidsIssue.generateInternalErrorPromise(internalError, dataset.datasetDescription.file)
}
} catch (schemaIssues) {
return BidsHedIssue.fromHedIssues(schemaIssues, dataset.datasetDescription.file)
Expand Down

0 comments on commit 8f17c4a

Please sign in to comment.