-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Description
Bug Report
- When I get a json list (from server) and that a value I try to reach doesn't exist, the application crash
Feature Request
- I think that this kind of things shouldn't happen (maybe an error, or maybe something returning nothing would be better)
What is the best solution in this cases ? (Check before trying to get value ?..)
Edit
I didn't notice that:
note operator[] implements unchecked access for const objects: If the given key is not present, the behavior is undefined (think of a dereferenced null pointer) and yields an assertion failure if assertions are switched on. If you are not sure whether an element in an object exists, use checked access with the at() function.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels