Package org.waveprotocol.wave.model.operation

Examples of org.waveprotocol.wave.model.operation.OperationRuntimeException


      public void consume(O operation) {
        try {
          operation.apply(data);
        } catch (OperationException e) {
          // Fail this object permanently
          throw new OperationRuntimeException("Error applying op", e);
        }
      }
    };
    return new LiveTarget<T, O>(data, executor, output);
  }
View Full Code Here


        };

    try {
      documentContext.getIndexedDoc().consume(initialContent);
    } catch (OperationException e) {
      throw new OperationRuntimeException("Invalid constructing op", e);
    }

    return documentContext;
  }
View Full Code Here

          DocOp docOp = doc.consumeAndReturnInvertible(op);
          if (outputSink != null) {
            outputSink.consume(docOp);
          }
        } catch (OperationException oe) {
          throw new OperationRuntimeException("DocProviders trivial sequencer consume failed.", oe);
        }
      }
    };
  }
View Full Code Here

  private DocOp getDocOpFromNindo(Nindo nindo) {
    try {
      return DocProviders.POJO.build(editor.getDocumentInitialization(),
          DocumentSchema.NO_SCHEMA_CONSTRAINTS).consumeAndReturnInvertible(nindo);
    } catch (OperationException e) {
      throw new OperationRuntimeException("initialization failed", e);
    }
  }
View Full Code Here

          RawDocumentImpl.PROVIDER.create("doc", Attributes.EMPTY_MAP), null,
          DocumentSchema.NO_SCHEMA_CONSTRAINTS);
    try {
      doc.consume(other.asOperation());
    } catch (OperationException e) {
      throw new OperationRuntimeException("Copy should not fail", e);
    }
    return doc;
  }
View Full Code Here

      @Override
      public void consume(Nindo op) {
        try {
          latestOp = document.consumeAndReturnInvertible(op);
        } catch (OperationException oe) {
          throw new OperationRuntimeException("sequencer consume failed.", oe);
        }
      }
    };
  }
View Full Code Here

          System.out.println(DocOpUtil.toXmlString(indexedDoc.asOperation()));
          throw e;
        }
      }
    } catch (OperationException e) {
      throw new OperationRuntimeException("Test Failure", e);
    }
  }
View Full Code Here

          @Override
          public void consume(Nindo op) {
            try {
              consumeNindo(op);
            } catch (OperationException e) {
              throw new OperationRuntimeException("Bug!", e);
            }
          }

          @Override
          public void end() {
View Full Code Here

      DocInitialization initialisation = DocOpUtil.asInitialization(bothOps);
      assert DocOpValidator.validate(null, schemaConstraints, initialisation).isValid();

      return initialisation;
    } catch (OperationException e) {
      throw new OperationRuntimeException("Bug either in indexed document or the composer", e);
    }
  }
View Full Code Here

   * TODO(zdwang): Remove this, it's better to just throw exceptions at the source, the leave the
   * exception policy to the caller.
   */
  void handleException(OperationException e) {
    // TODO(user): implement appropriate policy
    throw new OperationRuntimeException("OpBasedWavelet caught exception: " + e, e);
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.operation.OperationRuntimeException

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.