chromium/third_party/blink/renderer/platform/bindings/exception_messages.cc

/*
 * Copyright (C) 2013 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/platform/bindings/exception_messages.h"

#include "base/notreached.h"
#include "third_party/blink/renderer/platform/bindings/exception_context.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/wtf/decimal.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"

namespace blink {

namespace {

String optionalNameProperty(const String& property) {}

String optionalIndexProperty(const String& property) {}

}  //  namespace

String ExceptionMessages::AddContextToMessage(const ExceptionContext& context,
                                              const String& message) {}

String ExceptionMessages::FailedToConvertJSValue(const char* type) {}

String ExceptionMessages::FailedToConstruct(const char* type,
                                            const String& detail) {}

String ExceptionMessages::FailedToEnumerate(const char* type,
                                            const String& detail) {}

String ExceptionMessages::FailedToExecute(const String& method,
                                          const char* type,
                                          const String& detail) {}

String ExceptionMessages::FailedToGet(const String& property,
                                      const char* type,
                                      const String& detail) {}

String ExceptionMessages::FailedToSet(const String& property,
                                      const char* type,
                                      const String& detail) {}

String ExceptionMessages::FailedToDelete(const String& property,
                                         const char* type,
                                         const String& detail) {}

String ExceptionMessages::FailedToGetIndexed(const String& property,
                                             const char* type,
                                             const String& detail) {}

String ExceptionMessages::FailedToSetIndexed(const String& property,
                                             const char* type,
                                             const String& detail) {}

String ExceptionMessages::FailedToDeleteIndexed(const String& property,
                                                const char* type,
                                                const String& detail) {}

String ExceptionMessages::FailedToGetNamed(const String& property,
                                           const char* type,
                                           const String& detail) {}

String ExceptionMessages::FailedToSetNamed(const String& property,
                                           const char* type,
                                           const String& detail) {}

String ExceptionMessages::FailedToDeleteNamed(const String& property,
                                              const char* type,
                                              const String& detail) {}

String ExceptionMessages::ConstructorNotCallableAsFunction(const char* type) {}

String ExceptionMessages::ConstructorCalledAsFunction() {}

String ExceptionMessages::IncorrectPropertyType(const String& property,
                                                const String& detail) {}

String ExceptionMessages::InvalidArity(const char* expected,
                                       unsigned provided) {}

String ExceptionMessages::ArgumentNullOrIncorrectType(
    int argument_index,
    const String& expected_type) {}

String ExceptionMessages::ArgumentNotOfType(int argument_index,
                                            const char* expected_type) {}

String ExceptionMessages::NotASequenceTypeProperty(
    const String& property_name) {}

String ExceptionMessages::NotEnoughArguments(unsigned expected,
                                             unsigned provided) {}

String ExceptionMessages::NotAFiniteNumber(double value, const char* name) {}

String ExceptionMessages::NotAFiniteNumber(const Decimal& value,
                                           const char* name) {}

String ExceptionMessages::OrdinalNumber(int number) {}

String ExceptionMessages::IndexExceedsMaximumBound(const char* name,
                                                   bool eq,
                                                   const String& given,
                                                   const String& bound) {}

String ExceptionMessages::IndexExceedsMinimumBound(const char* name,
                                                   bool eq,
                                                   const String& given,
                                                   const String& bound) {}

String ExceptionMessages::IndexOutsideRange(const char* name,
                                            const String& given,
                                            const String& lower_bound,
                                            BoundType lower_type,
                                            const String& upper_bound,
                                            BoundType upper_type) {}

String ExceptionMessages::ReadOnly(const char* detail) {}

String ExceptionMessages::SharedArrayBufferNotAllowed(
    const char* expected_type) {}

String ExceptionMessages::ResizableArrayBufferNotAllowed(
    const char* expected_type) {}

String ExceptionMessages::ValueNotOfType(const char* expected_type) {}

template <>
String ExceptionMessages::FormatNumber<float>(float number) {}

template <>
String ExceptionMessages::FormatNumber<double>(double number) {}

}  // namespace blink