..my fix for this was to type-coerce the path into a resource and call 
.exists() on it. 
the runtime exception was thrown from the assetSource.getExpandedAsset method 
in this case.

Am 24.11.2011 um 09:04 schrieb Ville:

> Hi,
> 
> https://issues.apache.org/jira/browse/TAP5-1425 was fixed, but it breaks a
> lot of existing functionality.
> 
> Resource has method exists(), but what is the point of this method if the
> service throws RuntimeException when loading resources that doesn't exist?
> 
> This is from Tap5Jquery:
> if(this.assetSource.getExpandedAsset(path).getResource().exists()) {
>    return this.assetSource.getExpandedAsset(path);
> }
> return null;
> 
> Do we now have to catch RuntimeException and return null if such is thrown?
> We should atleast have ResourceNotFoundRuntimeException?
> 
> - Ville
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/TAP5-1425-tp5019523p5019523.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

  • TAP5-1425 Ville
    • Re: TAP5-1425 Christian Riedel

Reply via email to