1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #include "txIXPathContext.h"
11 nsresult
txErrorExpr::evaluate(txIEvalContext
* aContext
,
12 txAExprResult
** aResult
) {
15 nsAutoString
err(u
"Invalid expression evaluated"_ns
);
17 err
.AppendLiteral(": ");
20 aContext
->receiveError(err
, NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED
);
22 return NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED
;
25 TX_IMPL_EXPR_STUBS_0(txErrorExpr
, ANY_RESULT
)
27 bool txErrorExpr::isSensitiveTo(ContextSensitivity aContext
) {
28 // It doesn't really matter what we return here, but it might
29 // be a good idea to try to keep this as unoptimizable as possible
34 void txErrorExpr::toString(nsAString
& aStr
) { aStr
.Append(mStr
); }