Differences From Artifact [285804da91]:
- File src/OFString+URLEncoding.m — part of check-in [813c00ccf0] at 2013-01-09 22:24:47 on branch trunk — Update copyright. (user: js, size: 3272) [annotate] [blame] [check-ins using]
To Artifact [5d54dc5328]:
- File
src/OFString+URLEncoding.m
— part of check-in
[3d16a30f41]
at
2013-06-22 12:12:36
on branch trunk
— Rework exceptions.
This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. (user: js, size: 3158) [annotate] [blame] [check-ins using]
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + - - + | #include <stdlib.h> #include <string.h> #include <ctype.h> #import "OFString+URLEncoding.h" |
︙ | |||
81 82 83 84 85 86 87 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - - + | char *retCString; char byte = 0; int state = 0; size_t i; if ((retCString = malloc([self UTF8StringLength] + 1)) == NULL) @throw [OFOutOfMemoryException |
︙ | |||
106 107 108 109 110 111 112 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - + - - + - | byte += (*string - '0') << shift; else if (*string >= 'A' && *string <= 'F') byte += (*string - 'A' + 10) << shift; else if (*string >= 'a' && *string <= 'f') byte += (*string - 'a' + 10) << shift; else { free(retCString); |