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

Tidy Error Messages #2

Open
jtrobinson3 opened this issue May 8, 2013 · 1 comment
Open

Tidy Error Messages #2

jtrobinson3 opened this issue May 8, 2013 · 1 comment

Comments

@jtrobinson3
Copy link

I would like to see the error messages when errors occur while running Tidy, but there does not seem to be a way to do this. I set the "show-errors" in the configuration to a very high number and that did not work.

Looking though the code I noticed this:
On line 335 - 338 (in the master branch at the date of creating this issue) of /NppTidy2/Tidy2/PluginMain.cpp the following is written:

if (errorCount > 0)
{
    ::MessageBox(nppData._nppHandle, _T("Errors were encountered tidying the document"), _T("Tidy Errors"), MB_ICONERROR | MB_OK);
}

This suggests that no error messages would ever be shown to the user and there does not appear to be any way to get Tidy to export to a log file. Can this be fixed to either show or log error messages so the problems can be known instead of just seeing a message that errors had occured?

Suggestion: Like the XML Tools plugin: show the last error. I also suggest showing "Error 1 of X" since it seems to count the total number of errors.

@geoffmcl
Copy link

@jtrobinson3 yes, it looks like only an error indication is shown, not the actual warnings and error...

But yes, you can configure Tidy to write an error file... just add to the tidy?.cfg file -

error-file: path\to\log.txt

Check out the last published QuickRef for the many parameters that can be added to the config file...

Yes, a more complicated approach would be like you say, to be able to review the output... very possible, but needs some coding work...

BTW: I just updated my fork of this repo, and posted a release zip containing a Tidy2.dll built against the latest 5.3.1 (2016.04.16) HTML Tidy...

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