Author: [email protected]
Date: Tue Jan 24 10:29:44 2012
New Revision: 1981
Log:
[AMDATUOPENSOCIAL-145] Improved the error messages
Modified:
trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/rest/BaseRESTServiceImpl.java
trunk/amdatu-opensocial/opensocial-shindig/src/main/java/org/amdatu/opensocial/shindig/service/ConfigurableGadgetSpecFactory.java
Modified:
trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/rest/BaseRESTServiceImpl.java
==============================================================================
---
trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/rest/BaseRESTServiceImpl.java
(original)
+++
trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/rest/BaseRESTServiceImpl.java
Tue Jan 24 10:29:44 2012
@@ -165,7 +165,7 @@
widget.setTitleUrl("");
// Set description
- widget.setDescription("<i>The gadget XML cannot be retrieved</i>");
+ widget.setDescription("<i>The gadget is currently
unavailable</i>");
// Set screenshot
// FIXME: the /gadgets alias refers to another bundle; Shindig
Modified:
trunk/amdatu-opensocial/opensocial-shindig/src/main/java/org/amdatu/opensocial/shindig/service/ConfigurableGadgetSpecFactory.java
==============================================================================
---
trunk/amdatu-opensocial/opensocial-shindig/src/main/java/org/amdatu/opensocial/shindig/service/ConfigurableGadgetSpecFactory.java
(original)
+++
trunk/amdatu-opensocial/opensocial-shindig/src/main/java/org/amdatu/opensocial/shindig/service/ConfigurableGadgetSpecFactory.java
Tue Jan 24 10:29:44 2012
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2010, 2011 The Amdatu Foundation
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -55,7 +55,7 @@
* shindig.cache.xml.refreshInterval.[response code]=[refresh interval]
* Note that the value of shindig.cache.xml.refreshInterval is used as
default, for all
* response codes for which no specific refresh interval has been defined.
- *
+ *
* @author <a href="mailto:[email protected]">Amdatu Project
Team</a>
*/
@SuppressWarnings("rawtypes")
@@ -173,7 +173,7 @@
/**
* Attempt to fetch a spec, either from cache or from the network.
- *
+ *
* Note that the {@code query} passed here will always be passed,
unmodified, to {@link #parse(String, Query)}. This can be used to carry
additional context information
* during parsing.
*/
@@ -254,9 +254,8 @@
retcode = HttpResponse.SC_BAD_GATEWAY;
}
throw new
GadgetException(GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT,
- "Unable to retrieve spec for " + query.specUri + ". HTTP error
" +
- response.getHttpStatusCode(),
- retcode);
+ "The gadget '" + query.specUri + "' is currently unavailable.
HTTP error: " +
+ response.getHttpStatusCode(), retcode);
}
try {
_______________________________________________
Amdatu-commits mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-commits