Commit 6982901
committed
utf8_to_uv_msgs: Error if tries to both return and warn
This panics if the flags to the call of this function are contradictory,
in that it is both to warn if anything goes wrong, and not to warn under
any circumstances but instead to return to the caller objects describing
what it would warn.
I'm unsure what the proper thing is to do here. This commit makes this
a run time panic when the conflict actually happens, but not until.
This is along the lines of you can divide, but only when the divisor is
0 is an error raised. I think this is better than croaking if there is
even the possibility of a problem. But I'm not sure. And should it be
a panic or just a fatal error, or just a warning and we choose probably
to die if one of the flags says to die, or to both warn and return if
one of the flags says just warn.1 parent 5a80af9 commit 6982901
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
| |||
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
1643 | | - | |
1644 | | - | |
| 1643 | + | |
| 1644 | + | |
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
| |||
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
2496 | 2505 | | |
2497 | 2506 | | |
2498 | 2507 | | |
| |||
0 commit comments