Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: include/core/SkError.h

Issue 13699004: first draft of error checking / reporting API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tests.gyp ('k') | src/core/SkError.cpp » ('j') | src/core/SkError.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkError.h
diff --git a/include/core/SkError.h b/include/core/SkError.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b4e9789dbdaac8bbcc41025aad426cfa588a51a
--- /dev/null
+++ b/include/core/SkError.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkError_DEFINED
+#define SkError_DEFINED
+
+typedef enum {
+ kError_NoError=0,
+ kError_InvalidArgument,
+ kError_InvalidOperation,
+ kError_InvalidHandle,
+ kError_InvalidPaint,
+ kError_OutOfMemory,
+ kError_ParseError
+} SkError;
+
+SkError SkGetLastError();
+void SkClearLastError();
+typedef void (*SkErrorCallbackFunction)(SkError, void *);
+
+void SkSetErrorCallback(SkErrorCallbackFunction cb, void *context);
+const char *SkGetLastErrorString();
+
+#endif /* SkError_DEFINED */
« no previous file with comments | « gyp/tests.gyp ('k') | src/core/SkError.cpp » ('j') | src/core/SkError.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698