You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/11/18 04:58:26 UTC
svn commit: r476438 -
/incubator/xap/trunk/src/xap/requestservice/RequestService.js
Author: jmargaris
Date: Fri Nov 17 20:58:25 2006
New Revision: 476438
URL: http://svn.apache.org/viewvc?view=rev&rev=476438
Log:
error message formatted better
Modified:
incubator/xap/trunk/src/xap/requestservice/RequestService.js
Modified: incubator/xap/trunk/src/xap/requestservice/RequestService.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/requestservice/RequestService.js?view=diff&rev=476438&r1=476437&r2=476438
==============================================================================
--- incubator/xap/trunk/src/xap/requestservice/RequestService.js (original)
+++ incubator/xap/trunk/src/xap/requestservice/RequestService.js Fri Nov 17 20:58:25 2006
@@ -125,15 +125,9 @@
*/
xap.requestservice.RequestService.prototype.retrieve = function(url) {
var content = xap.util.HttpUtils.get(url);
- // Requests to tomcat (at least, and at least by default) never "fail",
- // as such; rather they hand you a 404 page. This isn't
- // useful for us, so throw an exception if it's the case:
- if(content.status == xap.util.HttpUtils.URI_NA){
- throw new xap.util.Exception("The requested page"
- + "\n\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
- + url
- + "\nis not available."
- ) ;
+ if(content.status != xap.util.HttpUtils.OK){
+ var uri = url.getUri?url.getUri():url;
+ throw new xap.util.Exception("The requested page " + uri + " is not available");
}
return content ;
}