Overview
Comment: | Rename a few exception-related methods. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5e44debc0705bdce2a50fabf1f502f29 |
User & Date: | js on 2010-12-11 20:27:54 |
Other Links: | manifest | tags |
Context
2010-12-12
| ||
00:38 | Add -[filtered{Array,Dictionary}UsingBlock]. check-in: 42060f220c user: js tags: trunk | |
2010-12-11
| ||
20:27 | Rename a few exception-related methods. check-in: 5e44debc07 user: js tags: trunk | |
20:13 | Add -[description] to OFXMLElement. check-in: 4a8fcc8716 user: js tags: trunk | |
Changes
Modified src/OFExceptions.h from [c7546e633b] to [997d7c3607].
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - - + + - + | #endif /** * \param class_ The class of the object which caused the exception * \param size The size of the memory that couldn't be allocated * \return A new no memory exception */ |
︙ | |||
332 333 334 335 336 337 338 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - - + + - + | #endif /** * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \return A new open file failed exception */ |
︙ |
Modified src/OFExceptions.m from [f88616d600] to [809a668c5e].
︙ | |||
187 188 189 190 191 192 193 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - - + + - + - + | { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } @end @implementation OFOutOfMemoryException |
︙ | |||
514 515 516 517 518 519 520 | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - - + + - + - + | - (OFString*)mode { return mode; } @end @implementation OFReadOrWriteFailedException |
︙ |
Modified src/OFFile.m from [d71ec31613] to [fc04feb323].
︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | - + - + | - (size_t)_readNBytes: (size_t)size intoBuffer: (char*)buf { size_t ret; if (fd == -1 || eos) @throw [OFReadFailedException newWithClass: isa |
︙ |
Modified src/OFObject.m from [72238fc133] to [5f364917f3].
︙ | |||
497 498 499 500 501 502 503 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | - + | if (SIZE_MAX - PRE_IVAR->memchunks_size < 1 || memchunks_size > SIZE_MAX / sizeof(void*)) @throw [OFOutOfRangeException newWithClass: isa]; if ((memchunks = realloc(PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL) @throw [OFOutOfMemoryException newWithClass: isa |
︙ | |||
520 521 522 523 524 525 526 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - + - + | if (SIZE_MAX - PRE_IVAR->memchunks_size == 0 || memchunks_size > SIZE_MAX / sizeof(void*)) @throw [OFOutOfRangeException newWithClass: isa]; if ((ptr = malloc(size)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa |
︙ | |||
567 568 569 570 571 572 573 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | - - + + | iter = PRE_IVAR->memchunks + PRE_IVAR->memchunks_size; while (iter-- > PRE_IVAR->memchunks) { if (OF_UNLIKELY(*iter == ptr)) { if (OF_UNLIKELY((ptr = realloc(ptr, size)) == NULL)) @throw [OFOutOfMemoryException |
︙ |
Modified src/OFStreamSocket.m from [fc3b5a9ea7] to [66237703fc].
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + | /* FIXME: We want a sane error message on Win32 as well */ if (eos) errno = ENOTCONN; #endif if (eos || (ret = recv(sock, buf, size, 0)) < 0) @throw [OFReadFailedException newWithClass: isa |
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + | /* FIXME: We want a sane error message on Win32 as well */ if (eos) errno = ENOTCONN; #endif if (eos || (ret = send(sock, buf, size, 0)) == -1) @throw [OFWriteFailedException newWithClass: isa |
︙ |
Modified src/OFString+URLEncoding.m from [7718e4ffef] to [5dc41af38c].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | /* * Worst case: 3 times longer than before. * Oh, and we can't use [self allocWithSize:] here as self might be a * @"" literal. */ if ((ret_c = malloc((length * 3) + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa |
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | int st; OFString *ret; s = string; if ((ret_c = malloc(length + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa |
︙ |
Modified src/OFString+XMLEscaping.m from [fa81256b88] to [a9e7ed69df].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + | len = length; /* * We can't use allocMemoryWithSize: here as it might be a @"" literal */ if ((str_c = malloc(len)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - - + + | append_len = 0; } if (append != NULL) { if ((tmp = realloc(str_c, len + append_len)) == NULL) { free(str_c); @throw [OFOutOfMemoryException |
︙ |
Modified src/OFString.m from [b78aed1909] to [197d311a2d].
︙ | |||
585 586 587 588 589 590 591 | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | - - + + + - | isUTF8 = YES; break; case -1:; @throw [OFInvalidEncodingException newWithClass: isa]; } if ((string = strdup(string)) == NULL) |
︙ |