congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StorageErrorCode
Code IndexAdd Tabnine to your IDE (free)

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

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

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.storageStorageErrorCode

Javadoc

Represents error codes that may be returned by the Microsoft Azure storage services or the storage client library.

Most used methods

  • toString

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • JFrame (javax.swing)
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now