Package com.orientechnologies.common.exception

Examples of com.orientechnologies.common.exception.OException


    OLogManager.instance().debug(this, "Discovering entity classes inside package: %s", iPackageName);

    try {
      registerEntityClasses(OReflectionHelper.getClassesFor(iPackageName, iClassLoader));
    } catch (ClassNotFoundException e) {
      throw new OException(e);
    }
  }
View Full Code Here


      Class clz = (Class) clzMethod[0];
      String result = null;
      try {
        result = (String) method.invoke(clz.newInstance(), iDocument);
      } catch (Exception ex) {
        throw new OException("Failed to invoke method " + method.getName(), ex);
      }
      if (result == null) {
        return RESULT.RECORD_NOT_CHANGED;
      }
      return RESULT.valueOf(result);
View Full Code Here

    final ORecord record = (ORecord) o;
    if (record.getRecord().getInternalStatus() == ORecordElement.STATUS.NOT_LOADED) {
      try {
        o = record.<ORecord> load();
      } catch (ORecordNotFoundException e) {
        throw new OException("Error during loading record with id : " + record.getIdentity());
      }
    }
    return o;
  }
View Full Code Here

    if (value == null) {
      // CREATE IT
      try {
        value = iCallback.call();
      } catch (Exception e) {
        throw new OException("Error on creation of shared resource", e);
      }

      if (value instanceof OSharedResource)
        ((OSharedResource) value).acquireExclusiveLock();
View Full Code Here

        }
        added = true;
      }
    } while (added);
    if (!operators.isEmpty()) {
      throw new OException("Unvalid sorting. " + OCollections.toString(pairs));
    }
    SORTED_OPERATORS = sorted.toArray(new OQueryOperator[sorted.size()]);
    return SORTED_OPERATORS;
  }
View Full Code Here

    final String format = iParams[1].toString();

    if (OSQLFunctionEncode.FORMAT_BASE64.equalsIgnoreCase(format)) {
      return OBase64Utils.decode(candidate);
    } else {
      throw new OException("unknowned format :" + format);
    }
  }
View Full Code Here

         final String[] parts = p.split("=");
         if (parts.length == 2)
           try {
             params.put(parts[0], URLDecoder.decode(parts[1], "UTF-8"));
           } catch (UnsupportedEncodingException e) {
             throw new OException(e);
           }
       }
       return params;
     }
     return Collections.emptyMap();
View Full Code Here

    }

    if (FORMAT_BASE64.equalsIgnoreCase(format)) {
      return OBase64Utils.encodeBytes(data);
    } else {
      throw new OException("unknowned format :" + format);
    }
  }
View Full Code Here

    final Class<? extends V> cls = registry.get(iKey);
    if (cls != null) {
      try {
        return cls.newInstance();
      } catch (Exception e) {
        throw new OException(String.format("Error on creating new instance of class '%s' registered in factory with key '%s'", cls,
            iKey), e);
      }
    }

    return newInstanceOfDefaultClass();
View Full Code Here

  public V newInstanceOfDefaultClass() {
    if (defaultClass != null) {
      try {
        return defaultClass.newInstance();
      } catch (Exception e) {
        throw new OException(String.format("Error on creating new instance of default class '%s'", defaultClass), e);
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.common.exception.OException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.