Is your feature request related to a problem? Please describe
Recently, an optional path argument was added to Reporter#report to add more information to the error. In some cases there is still not enough information.
Example:
<bpmn:businessRuleTask />
This business rule task is missing an extension element that is required. The path could be specified as [ 'extensionElements', 'values' ] but there is no information about what type of extension element is missing. For any missing property that is isMany=true the information about the type is missing.
Describe the solution you'd like
Either
introduce a new concept of e.g. error types along with additional information (e.g. { type: 'missingProperty', missingPropertyType: 'foo:Bar' }
or
introduce a way of providing arbitrary information when calling Reporter#report (e.g. Reporter.report(id, message, path, { type: 'missingProperty', missingPropertyType: 'foo:Bar' })
Describe alternatives you've considered
Additional context
Assumptions about the error could be derived from the error message itself.
Is your feature request related to a problem? Please describe
Recently, an optional
path
argument was added toReporter#report
to add more information to the error. In some cases there is still not enough information.Example:
This business rule task is missing an extension element that is required. The path could be specified as
[ 'extensionElements', 'values' ]
but there is no information about what type of extension element is missing. For any missing property that isisMany=true
the information about the type is missing.Describe the solution you'd like
Either
{ type: 'missingProperty', missingPropertyType: 'foo:Bar' }
or
Reporter#report
(e.g.Reporter.report(id, message, path, { type: 'missingProperty', missingPropertyType: 'foo:Bar' }
)Describe alternatives you've considered
Additional context
Assumptions about the error could be derived from the error message itself.