Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More detailed PrinceXML error messages #7

Closed
shiffman opened this issue Apr 20, 2016 · 3 comments
Closed

More detailed PrinceXML error messages #7

shiffman opened this issue Apr 20, 2016 · 3 comments

Comments

@shiffman
Copy link
Contributor

I'm trying to get more detail about a PrinceXML error. What about a "verbose" build argument to grab the output of callback(error)?

      Prince()
        .inputs(path.join(extras.destination, "consolidated.html"))
        .output(path.join(extras.destination, "consolidated.pdf"))
        .execute()
        .then(function () {
          callback(null, config, stream, extras);
        }, function (error) {
          console.log("Prince XML error")
          callback(error);
        });
    });

console.log("Prince XML error")

@shiffman
Copy link
Contributor Author

I noticed that the error messages can be insanely long if one thing is out of place. I am dealing with this by writing the error to a file to examine, this might be a good option too.

@runemadsen
Copy link
Contributor

Great idea. I'm going to add this today.

@runemadsen
Copy link
Contributor

Okay, this has been fixed in 0.1.4. You can now add the following to your config file:

"pdf" : {
  "log" : "mylog.txt"
}

And each build will have a mylog.txt file with the Prince log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants