Permalink
Browse files

Forgot one file in previous commit

  • Loading branch information...
1 parent c3c59ed commit 624a33c1cc2000e773c3d5e90adfa22e00a51baa @tmortagne tmortagne committed Jun 14, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 xwiki-commons-core/pom.xml
@@ -146,6 +146,8 @@
<!-- Remove the following excludes after we release the current version as final -->
<!-- New #isValid() method -->
<exclude>org/xwiki/extension/InstalledExtension</exclude>
+ <!-- [YOUNG API] Moved from Exception to Thowable parameter for extending jobs -->
+ <exclude>org/xwiki/job/AbstractJob</exclude>
@vmassol

vmassol Jun 14, 2012

Owner

Are you sure about this. Throwing Throwable is not recommended.

It would be much better to throw a custom Exception for an API.

@tmortagne

tmortagne Jun 14, 2012

Owner

I don't throw anything. This catch is in the place where we call a component we don't control and we want to be sure to not break the current thread which have other jobs to execute after this one.

@vmassol

vmassol Jun 14, 2012

Owner

I still don't think we should have an API that throws it. I'll need to check the code but it would be strange that there aren't any solution to do this.

@tmortagne

tmortagne Jun 14, 2012

Owner

Again I don't throw anything. I call whatever component which is register as a job and protect myself as much as I can whatever the job is doing. This exclude has nothing to do with a throws, it's just a protected method responsible to handle the throwable to produce proper log etc. and since it's protected I have to put an exclude.

@vmassol

vmassol Jun 14, 2012

Owner

yes but my point is that you should throw some JobException and implementation code should try/catch and rethrow a JobException if needed.

@tmortagne

tmortagne Jun 14, 2012

Owner

But I don't want to throw anything, the exception I'm catching is put in the job status log. I don't see the point in wrapping it in a useless exception.

</excludes>
</configuration>
</plugin>

0 comments on commit 624a33c

Please sign in to comment.