Make message public
drexseoj opened this issue · 2 comments
drexseoj commented
This is feature request.
Could it be possible to make the error message public. In this way it will be easier to get the and log the message when it is thrown.
So changing line 6 in lib/util.ts from
constructor(public path: string, message: string) {
to
constructor(public path: string, public message: string) {
then then the message can be retried in a catch block by err.message
dsagal commented
I think it's already possible, since VError extends Error whose .message
property is public. Could you share a piece of code where this would make a difference?
dsagal commented
Closing since err.message
as thrown from the checker checks is already public.