/// <summary>
        /// Create a new StaticError, wrapping a Saxon XPathException
        /// </summary>

        internal StaticError(TransformerException err) {
            if (err is XPathException) {
                this.exception = (XPathException)err;
            } else {
                this.exception = JStaticError.makeStaticError(err);
            }
        }
コード例 #2
0
ファイル: Destination.cs プロジェクト: orbeon/saxon-he
 public override void startDocument(int properties)
 {
     if (ended)
     {
         JXPathException e = new JXPathException("Only a single document can be written to an XdmDestination");
         throw new DynamicError(e);
     }
     base.startDocument(properties);
     level++;
 }
コード例 #3
0
 public override void startElement(NodeName nameCode, JSchemaType typeCode, int locationId, int properties)
 {
     if (ended)
     {
         JXPathException e = new JXPathException("Only a single root node can be written to an XdmDestination");
         throw new DynamicError(e);
     }
     base.startElement(nameCode, typeCode, locationId, properties);
     level++;
 }
コード例 #4
0
        // internal constructor: Create a new DynamicError, wrapping a Saxon XPathException

        internal DynamicError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
コード例 #5
0
ファイル: Errors.cs プロジェクト: orbeon/saxon-he
        // internal constructor: Create a new DynamicError, wrapping an SaxonApiException

        internal DynamicError(JSaxonApiException err)
        {
            if (err.getCause() is XPathException)
            {
                this.exception = (XPathException)err.getCause();
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
コード例 #6
0
ファイル: XQuery.cs プロジェクト: orbeon/saxon-he
        /// <summary>
        /// Evaluate the query, returning the result as an <c>IEnumerator</c> (that is,
        /// an enumerator over a sequence of nodes and/or atomic values).
        /// </summary>
        /// <returns>
        /// An enumerator over the sequence that represents the results of the query.
        /// Each object in this sequence will be an instance of <c>XdmItem</c>. Note
        /// that the query may be evaluated lazily, which means that a successful response
        /// from this method does not imply that the query has executed successfully: failures
        /// may be reported later while retrieving items from the iterator.
        /// </returns>
        /// <exception cref="DynamicError">Throws a <c>DynamicError</c> if any run-time failure
        /// occurs while evaluating the expression.</exception>

        public IEnumerator GetEnumerator()
        {
            try
            {
                return(new SequenceEnumerator <XdmItem>(evaluator.iterator()));
            }
            catch (net.sf.saxon.s9api.SaxonApiUncheckedException err)
            {
                throw new DynamicError(JXPathException.makeXPathException(err));
            }
        }
コード例 #7
0
        // internal constructor: Create a new StaticError, wrapping a Saxon XPathException

        internal StaticError(JException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
コード例 #8
0
ファイル: Errors.cs プロジェクト: fidothe/saxon-he
        /// <summary>
        /// Create a new StaticError, wrapping a Saxon XPathException
        /// </summary>

        internal StaticError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = JStaticError.makeStaticError(err);
            }
        }
コード例 #9
0
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output. This
        /// method sets the destination base URI to the URI corresponding to the name of the supplied file.</param>
        /// <exception cref="DynamicError">Throws a <c>DynamicError</c> if it is not possible to
        /// create an output stream to write to this file, for example, if the filename is in a
        /// directory that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                serializer.setOutputFile(new java.io.File(filename));
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
コード例 #10
0
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output</param>
        /// <exception>Throws a <c>DynamicError</c> if it is not possible to create an output
        /// stream to write to this file, for example, if the filename is in a directory
        /// that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                outputStream = new JFileOutputStream(filename);
                mustClose    = true;
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
コード例 #11
0
ファイル: Errors.cs プロジェクト: nuxleus/saxonica
        /// <summary>
        /// Create a new DynamicError, wrapping a Saxon XPathException
        /// </summary>
        /// <param name="err">The exception to be wrapped</param>

        internal DynamicError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
コード例 #12
0
ファイル: Errors.cs プロジェクト: fidothe/saxon-he
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>

        public DynamicError(String message)
        {
            exception = new JDynamicError(message);
        }
コード例 #13
0
ファイル: Errors.cs プロジェクト: nuxleus/saxonica
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>
        /// <param name="message">The error message</param>

        public DynamicError(String message)
        {
            exception = new XPathException(message);
        }
コード例 #14
0
ファイル: Destination.cs プロジェクト: nuxleus/saxonica
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output</param>
        /// <exception>Throws a <c>DynamicError</c> if it is not possible to create an output
        /// stream to write to this file, for example, if the filename is in a directory
        /// that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                outputStream = new JFileOutputStream(filename);
                mustClose = true;
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>

        public DynamicError(String message) {
            exception = new JDynamicError(message);
        }
コード例 #16
0
ファイル: Errors.cs プロジェクト: orbeon/saxon-he
 internal XmlProcessingError(JXmlProcessingError err) : base(XPathException.fromXmlProcessingError(err))
 {
     this.error = err;
 }
コード例 #17
0
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>
        /// <param name="message">The error message</param>

        public DynamicError(String message)
        {
            exception = new XPathException(message);
        }