changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Unify exception handling in wro processors #471

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Alex,

 I use wro4j at runtime and I found it very useful for improve code quality for css and javascript files.
 My application architecture is base on SpringFramework and is able to recognize a special running mode: "dev".
 While the application is running in "dev" some special features are activated.
 One of them is a HTML report for some of the wro4j processors (jshint, jslint, csshint and lesscss).
 The biggest problems I found for doing the html report can be summarized as:
 1) The exception handling isn't exactly in the available processors.
 2) The onException method on some of the mentioned processors is not able to re-throw the generated exception due that they are checked and not runtime exceptions like the WroRuntimeException

Finally, You can see the HTML report in action in the attached screen-shot!

Thanks

edgar

Original issue reported on code.google.com by espina.e...@gmail.com on 21 Jun 2012 at 8:49

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm not sure I understand the problem. First of all, your request is related to 
linter processors or all of them?

- The next release (1.4.7) changes the way exceptions caught during processing 
are handled. If an exception is caught during processing, the entire processing 
fails by default. It is possible to change that behavior by changing a flag.

If you are refering to linter processors only, than there is a protected method 
which allows clients to handle linter exceptions in a custom way. There is 
already an open issue whose purpose is to create a human readable html based on 
found linter problems.

If there is something I'm missing, please let me know. I would be happy to 
identify the problems and the actions required to fix them.

Thanks,
Alex

Original comment by alex.obj...@gmail.com on 21 Jun 2012 at 9:30

GoogleCodeExporter commented 9 years ago
Btw, the attached screenshot of the HTML report looks great! I would love to 
make it available by default. 

Original comment by alex.obj...@gmail.com on 21 Jun 2012 at 9:31