/** * Gets the Extended Error information from the response stream. * * @return the Extended Error information from the response stream * @throws ParserConfigurationException * @throws IOException * @throws SAXException */ public static StorageExtendedErrorInformation getExtendedErrorInformation(final InputStream stream) throws SAXException, IOException, ParserConfigurationException { SAXParser saxParser = Utility.getSAXParser(); StorageErrorHandler handler = new StorageErrorHandler(); saxParser.parse(stream, handler); return handler.errorInfo; }
/** * Returns extended error information for this request. * * @return A {@link StorageExtendedErrorInformation} object that represents the error details for the specified * request. */ public StorageExtendedErrorInformation parseErrorDetails() { try { if (this.getConnection() == null || this.getConnection().getErrorStream() == null) { return null; } return StorageErrorHandler.getExtendedErrorInformation(this.getConnection().getErrorStream()); } catch (final Exception e) { return null; } } }
/** * Returns extended error information for this request. * * @return A {@link StorageExtendedErrorInformation} object that represents the error details for the specified * request. */ public StorageExtendedErrorInformation parseErrorDetails() { try { if (this.getConnection() == null || this.getConnection().getErrorStream() == null) { return null; } return StorageErrorHandler.getExtendedErrorInformation(this.getConnection().getErrorStream()); } catch (final Exception e) { return null; } } }
/** * Gets the Extended Error information from the response stream. * * @return the Extended Error information from the response stream * @throws ParserConfigurationException * @throws IOException * @throws SAXException */ public static StorageExtendedErrorInformation getExtendedErrorInformation(final InputStream stream) throws SAXException, IOException, ParserConfigurationException { SAXParser saxParser = Utility.getSAXParser(); StorageErrorHandler handler = new StorageErrorHandler(); saxParser.parse(stream, handler); return handler.errorInfo; }