| 506 | } |
| 507 | |
| 508 | void set(const CUDTException& e) |
| 509 | { |
| 510 | CUDTException* cur = get(); |
| 511 | // If this returns NULL, it means that there was an unexpected |
| 512 | // memory allocation error. Simply ignore this request if so |
| 513 | // happened, and then when trying to get the error description |
| 514 | // the application will always get the memory allocation error. |
| 515 | |
| 516 | // There's no point in doing anything else here; lack of memory |
| 517 | // must be prepared for prematurely, and that was already done. |
| 518 | if (!cur) |
| 519 | return; |
| 520 | |
| 521 | *cur = e; |
| 522 | } |
| 523 | |
| 524 | /*[[nullable]]*/ CUDTException* get() |
| 525 | { |
no outgoing calls
no test coverage detected