Codota Logo
StorageErrorCode.toString
Code IndexAdd Codota to your IDE (free)

How to use
toString
method
in
com.microsoft.azure.storage.StorageErrorCode

Best Java code snippets using com.microsoft.azure.storage.StorageErrorCode.toString (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.apache.hadoop/hadoop-azure

public static boolean isFileNotFoundException(StorageException e) {
 String errorCode = e.getErrorCode();
 if (errorCode != null
   && (errorCode.equals(StorageErrorCodeStrings.BLOB_NOT_FOUND)
     || errorCode.equals(StorageErrorCodeStrings.RESOURCE_NOT_FOUND)
     || errorCode.equals(StorageErrorCodeStrings.CONTAINER_NOT_FOUND)
     || errorCode.equals(StorageErrorCode.BLOB_NOT_FOUND.toString())
     || errorCode.equals(StorageErrorCode.RESOURCE_NOT_FOUND.toString())
     || errorCode.equals(StorageErrorCode.CONTAINER_NOT_FOUND.toString()))) {
  return true;
 }
 return false;
}
origin: Azure/azure-storage-android

switch (statusCode) {
case HttpURLConnection.HTTP_FORBIDDEN:
  errorCode = StorageErrorCode.ACCESS_DENIED.toString();
  break;
case HttpURLConnection.HTTP_GONE:
case HttpURLConnection.HTTP_NOT_FOUND:
  errorCode = StorageErrorCode.RESOURCE_NOT_FOUND.toString();
  break;
case 416:
case HttpURLConnection.HTTP_BAD_REQUEST:
  errorCode = StorageErrorCode.BAD_REQUEST.toString();
  break;
  errorCode = StorageErrorCode.CONDITION_FAILED.toString();
  break;
  errorCode = StorageErrorCode.RESOURCE_ALREADY_EXISTS.toString();
  break;
  errorCode = StorageErrorCode.SERVER_BUSY.toString();
  break;
  errorCode = StorageErrorCode.SERVICE_TIMEOUT.toString();
  break;
  errorCode = StorageErrorCode.SERVICE_INTERNAL_ERROR.toString();
  break;
origin: com.microsoft.azure/azure-storage

/**
 * Returns an unexpected storage exception.
 * 
 * @param cause
 *            An <code>Exception</code> object that represents the initial exception that caused the unexpected
 *            error.
 * 
 * @return A {@link StorageException} object that represents the unexpected storage exception being thrown.
 */
public static StorageException generateNewUnexpectedStorageException(final Exception cause) {
  final StorageException exceptionRef = new StorageException(StorageErrorCode.NONE.toString(),
      "Unexpected internal storage client error.", 306, // unused
      null, null);
  exceptionRef.initCause(cause);
  return exceptionRef;
}
origin: Azure/azure-storage-android

/**
 * Returns an unexpected storage exception.
 * 
 * @param cause
 *            An <code>Exception</code> object that represents the initial exception that caused the unexpected
 *            error.
 * 
 * @return A {@link StorageException} object that represents the unexpected storage exception being thrown.
 */
public static StorageException generateNewUnexpectedStorageException(final Exception cause) {
  final StorageException exceptionRef = new StorageException(StorageErrorCode.NONE.toString(),
      "Unexpected internal storage client error.", 306, // unused
      null, null);
  exceptionRef.initCause(cause);
  return exceptionRef;
}
origin: Azure/azure-storage-android

  return new StorageException(StorageErrorCode.SERVICE_INTERNAL_ERROR.toString(),
      "An unknown failure occurred : ".concat(message), HttpURLConnection.HTTP_INTERNAL_ERROR,
      null, cause);
  return translatedException;
} else {
  return new StorageException(StorageErrorCode.SERVICE_INTERNAL_ERROR.toString(),
      "The server encountered an unknown failure: ".concat(responseMessage),
      HttpURLConnection.HTTP_INTERNAL_ERROR, null, cause);   
origin: com.microsoft.azure/azure-storage

throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
    SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: Azure/azure-storage-android

throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
    SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: com.microsoft.azure/azure-storage

return new StorageException(StorageErrorCode.SERVICE_INTERNAL_ERROR.toString(),
    "An unknown failure occurred : ".concat(message), HttpURLConnection.HTTP_INTERNAL_ERROR,
    null, cause);
origin: org.apache.hadoop/hadoop-azure

 currentKnownContainerState = ContainerState.Unknown;
} catch (StorageException ex) {
 if (StorageErrorCode.RESOURCE_NOT_FOUND.toString()
   .equals(ex.getErrorCode())) {
  currentKnownContainerState = ContainerState.DoesntExist;
origin: Azure/azure-storage-android

if (this.getLockedETag() != null) {
  if (!this.getLockedETag().equals(file.properties.getEtag())) {
    throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
        SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: com.microsoft.azure/azure-storage

if (this.getLockedETag() != null) {
  if (!this.getLockedETag().equals(file.properties.getEtag())) {
    throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
        SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: com.microsoft.azure/azure-storage

throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
    SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: Azure/azure-storage-android

throw new StorageException(StorageErrorCode.CONDITION_FAILED.toString(),
    SR.INVALID_CONDITIONAL_HEADERS, HttpURLConnection.HTTP_PRECON_FAILED, null, null);
origin: Azure/azure-storage-android

assertEquals(HttpURLConnection.HTTP_NOT_FOUND, e.getHttpStatusCode());
assertEquals("The specified container does not exist.", e.getMessage());
assertEquals(StorageErrorCode.RESOURCE_NOT_FOUND.toString(), e.getErrorCode());
origin: Azure/azure-storage-android

assertEquals(HttpURLConnection.HTTP_NOT_FOUND, e.getHttpStatusCode());
assertEquals("The specified container does not exist.", e.getMessage());
assertEquals(StorageErrorCode.RESOURCE_NOT_FOUND.toString(), e.getErrorCode());
assertEquals(HttpURLConnection.HTTP_NOT_FOUND, e.getHttpStatusCode());
assertEquals("The specified container does not exist.", e.getMessage());
assertEquals(StorageErrorCode.RESOURCE_NOT_FOUND.toString(), e.getErrorCode());
assertEquals(HttpURLConnection.HTTP_NOT_FOUND, e.getHttpStatusCode());
assertEquals("The specified container does not exist.", e.getMessage());
assertEquals(StorageErrorCode.RESOURCE_NOT_FOUND.toString(), e.getErrorCode());
com.microsoft.azure.storageStorageErrorCodetoString

Popular methods of StorageErrorCode

    Popular in Java

    • Reading from database using SQL prepared statement
    • runOnUiThread (Activity)
    • putExtra (Intent)
    • getSystemService (Context)
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • FileOutputStream (java.io)
      A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
    • Deque (java.util)
      A linear collection that supports element insertion and removal at both ends. The name deque is shor
    • LinkedHashMap (java.util)
      Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • Logger (org.slf4j)
      The main user interface to logging. It is expected that logging takes place through concrete impleme
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now