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

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: Several cleanups from Leon 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') | no next file with comments »
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 {
reed1 2013/04/08 19:47:31 I think all of our other enums are just enum SkEr
reed1 2013/04/08 19:47:31 Skia's other enums are named in reverse order from
humper 2013/04/08 20:10:55 Okay, I'll turn these around. On 2013/04/08 19:47
+ kError_NoError=0,
+ kError_InvalidArgument,
+ kError_InvalidOperation,
+ kError_InvalidHandle,
reed1 2013/04/08 19:47:31 What is a 'Handle' in the Skia world?
humper 2013/04/08 20:10:55 Done.
+ kError_InvalidPaint,
reed1 2013/04/08 19:47:31 What is an invalid paint?
+ kError_OutOfMemory,
+ kError_ParseError
+} SkError;
+
+SkError SkGetLastError();
reed1 2013/04/08 19:47:31 Need some dox for each of these, including that th
humper 2013/04/08 20:10:55 Done.
+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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698