guigrpa / docx-templates

Template-based docx report creation
MIT License
882 stars 145 forks source link

Add result to ObjectCommandResultError #341

Closed emilong closed 8 months ago

emilong commented 8 months ago

When a ObjectCommandResultError is thrown, this change attaches the computed result to the error in case a custom error handler wants to use it for some reason.

In my case, I use Proxy objects to wrap Objects with a toString() property that I've been using since 2.9.0 but stopped working with the introduction of object checking and ObjectCommandResultError, but this change should allow me to deal with that in a custom error handler.

jjhbw commented 8 months ago

Smart addition, thanks!