-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handling from Jesper (and much more) #30
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2991728
Error handling and lots of other stuff from Jesper
kspangsege ab0e163
Fixes for: Error handling and lots of other stuff from Jesper
kspangsege f9c32ab
Fixing ex_objc_table_typed_intro.m
kspangsege 6cd9213
Merge branch 'master' into ks-error-handling-from-jesper
kspangsege 05cab2e
Renaming types:
kspangsege 3d10d8a
Adding FIXME regarding removal of insert methods from public Obj-C API
kspangsege File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Category 1: NSError for "expected" problems | ||
=========================================== | ||
Characterized by: File access problem, network access problems.... User should be informed. Problems which cannot be eliminated during development. | ||
|
||
- Writing a group to a file, with file access problems. | ||
|
||
|
||
Category 2: NSException for "unexpected" problems - no recovery | ||
=============================================================== | ||
Characterized by: Fatal errors. Wrong use of API. Application should rightfully crash. These problems should be eliminated during development. Feedback should be fast and direct in the form of an exception. The | ||
application should not attempt to catch the exception. | ||
|
||
- Indexing out of bounds. | ||
- Passing illegal parameter type. | ||
- Writing to read only table (working assumption). | ||
- Core library exceptions. | ||
|
||
|
||
Category 3: NSException for "unexpected" problems - with recovery | ||
================================================================= | ||
Technically possible with ARC safe exceptions flag. Leads to excessive release code (automatically inserted). Should not be needed. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/* @@Example: ex_objc_table_typed_intro @@ */ | ||
|
||
|
||
#import <tightdb/objc/table.h> | ||
#import <tightdb/objc/tightdb.h> | ||
|
||
|
@@ -28,6 +27,15 @@ int main() | |
cursor.Name = @"Sofie"; | ||
cursor.Age = 40; | ||
|
||
/* | ||
[table addOrInsertRowAtIndex:[table count] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's remove this from now. |
||
Name:@"Jesper" | ||
Age:200]; | ||
*/ | ||
cursor = [table addRow]; | ||
cursor.Name = @"Jesper"; | ||
cursor.Age = 200; | ||
|
||
NSLog(@"The size of the table is now %zd", [table count]); | ||
|
||
for (PeopleTable_Cursor *ite in table) { | ||
|
@@ -50,12 +58,7 @@ int main() | |
TightdbCursor *c3 = [table cursorAtIndex:[table count]]; | ||
if (c3 != nil) | ||
NSLog(@"Should not get here."); | ||
|
||
|
||
} | ||
} | ||
|
||
|
||
|
||
|
||
/* @@EndExample@@ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo im => in