Skip to content

Commit

Permalink
Merge pull request #74 from eeditiones/errors-without-description
Browse files Browse the repository at this point in the history
fix(router): Handle errors without description
  • Loading branch information
line-o authored Aug 21, 2024
2 parents 8a9ebd9 + 9faa293 commit 1296ee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/router.xql
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ declare %private function router:resolve-ref ($config as map(*), $parts as xs:st
: Add line and source info to error description. To avoid outputting multiple locations
: for rethrown errors, check if $value is set.
:)
declare %private function router:error-description ($description as xs:string, $line as xs:integer?, $column as xs:integer?, $module as xs:string?, $value as item()*) as xs:string {
declare %private function router:error-description ($description as xs:string?, $line as xs:integer?, $column as xs:integer?, $module as xs:string?, $value as item()*) as xs:string {
if ($line and $line > 0 and empty($value)) then
``[`{$description}` [at line `{$line}` column `{$column}` in module `{head(($module, 'unknown'))}`]]``
else
$description
($description, $value)[1]
};

(:~
Expand Down

0 comments on commit 1296ee6

Please sign in to comment.