| Index: sky/engine/tonic/dart_error.cc
|
| diff --git a/sky/engine/tonic/dart_error.cc b/sky/engine/tonic/dart_error.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4ef6865437cb481fd3c6ed7f323fc59a5ec98e25
|
| --- /dev/null
|
| +++ b/sky/engine/tonic/dart_error.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "sky/engine/config.h"
|
| +#include "sky/engine/tonic/dart_error.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace blink {
|
| +
|
| +namespace DartError {
|
| +
|
| +const char kInvalidArgument[] = "Invalid argument.";
|
| +
|
| +} // namespace DartError
|
| +
|
| +bool LogIfError(Dart_Handle handle) {
|
| + if (Dart_IsError(handle)) {
|
| + LOG(ERROR) << Dart_GetError(handle);
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|