map: Provide useful warnings when missing import/@path
This is all really confusing because this doesn't use the same import specification as packages; maps got stuck in a partial transition. So, let's provide some helpful errors rather than silently failing. * src/current/compiler/map.xsl (preproc:symtable)[lvm:import]: Error if missing `@path'. Provide more information if `@package' was provided to help clarify.master
parent
c15ed8a2cd
commit
986b2a7b4b
|
@ -869,13 +869,23 @@
|
|||
|
||||
|
||||
<!-- import symbols -->
|
||||
<template match="lvm:import[ @path ]" mode="preproc:symtable" priority="5">
|
||||
<template match="lvm:import" mode="preproc:symtable" priority="5">
|
||||
<!-- original root passed to sym-discover -->
|
||||
<param name="orig-root" />
|
||||
|
||||
<variable name="src" as="xs:string"
|
||||
select="@path" />
|
||||
|
||||
<if test="not( @path )">
|
||||
<message terminate="yes"
|
||||
select="concat(
|
||||
'fatal: import missing @path',
|
||||
if ( @package ) then
|
||||
' (use instead of @package)'
|
||||
else
|
||||
() )" />
|
||||
</if>
|
||||
|
||||
<!-- perform symbol import -->
|
||||
<call-template name="preproc:symimport">
|
||||
<with-param name="orig-root" select="$orig-root" />
|
||||
|
|
Loading…
Reference in New Issue