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

Unified Diff: include/core/SkError.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | include/core/SkFlattenableBuffers.h » ('j') | src/core/SkImageFilter.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
index c5af46065f59a7d86d53fde510aa720dcb84a49c..06a9ae3ea3be30ca03f058bcf633e692c00e5428 100644
--- a/include/core/SkError.h
+++ b/include/core/SkError.h
@@ -15,39 +15,39 @@
enum SkError {
/** All is well
*/
- kNoError_SkError=0,
+ kNoError_SkError = 0x00,
sugoi1 2013/08/21 15:33:41 Changed these values so that they can be used as f
scroggo 2013/08/21 23:56:00 If we're going to change this, should we change th
scroggo 2013/08/21 23:57:16 nvm
/** User argument passed to Skia function was invalid: NULL when that’s
* not allowed, out of numeric range, bad enum, or violating some
* other general precondition.
*/
- kInvalidArgument_SkError,
+ kInvalidArgument_SkError = 0x01,
scroggo 2013/08/21 23:56:00 Typically we make these line up horizontally. i.e.
scroggo 2013/08/21 23:57:16 nvm
/** User tried to perform some operation in a state when the operation
* was not legal, or the operands make no sense (e.g., asking for
* pixels from an SkPictureCanvas). Other examples might be
* inset()’ing a rectangle to make it degenerate (negative width/height).
*/
- kInvalidOperation_SkError,
+ kInvalidOperation_SkError = 0x02,
/** Probably not needed right now, but in the future we could have opaque
* handles for SkPictures floating around, and it would be a good idea
* to anticipate this kind of issue.
*/
- kInvalidHandle_SkError,
+ kInvalidHandle_SkError = 0x04,
/** This is probably not possible because paint surely has defaults for
* everything, but perhaps a paint can get into a bad state somehow.
*/
- kInvalidPaint_SkError,
+ kInvalidPaint_SkError = 0x08,
/** Skia was unable to allocate memory to perform some task.
*/
- kOutOfMemory_SkError,
+ kOutOfMemory_SkError = 0x10,
/** Skia failed while trying to consume some external resource.
*/
- kParseError_SkError
+ kParseError_SkError = 0x20
};
/** Return the current per-thread error code. Error codes are "sticky"; they
« no previous file with comments | « no previous file | include/core/SkFlattenableBuffers.h » ('j') | src/core/SkImageFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698