|
80 | 80 | -spec declare |
81 | 81 | (name(), boolean(), boolean(), rabbit_framing:amqp_table(), |
82 | 82 | rabbit_types:maybe(pid()), rabbit_types:username()) -> |
83 | | - {'new' | 'existing' | 'absent' | 'owner_died', |
84 | | - rabbit_types:amqqueue()} | |
| 83 | + {'new' | 'existing' | 'owner_died', rabbit_types:amqqueue()} | |
| 84 | + {'absent', rabbit_types:amqqueue(), absent_reason()} | |
85 | 85 | rabbit_types:channel_exit(). |
86 | 86 | -spec declare |
87 | 87 | (name(), boolean(), boolean(), rabbit_framing:amqp_table(), |
|
129 | 129 | -spec notify_policy_changed(rabbit_types:amqqueue()) -> 'ok'. |
130 | 130 | -spec consumers(rabbit_types:amqqueue()) -> |
131 | 131 | [{pid(), rabbit_types:ctag(), boolean(), non_neg_integer(), |
132 | | - rabbit_framing:amqp_table()}]. |
| 132 | + rabbit_framing:amqp_table(), binary()}]. |
133 | 133 | -spec consumer_info_keys() -> rabbit_types:info_keys(). |
134 | 134 | -spec consumers_all(rabbit_types:vhost()) -> |
135 | 135 | [{name(), pid(), rabbit_types:ctag(), boolean(), |
|
161 | 161 | -spec notify_down_all(qpids(), pid()) -> ok_or_errors(). |
162 | 162 | -spec notify_down_all(qpids(), pid(), non_neg_integer()) -> |
163 | 163 | ok_or_errors(). |
164 | | --spec activate_limit_all(qpids(), pid()) -> ok_or_errors(). |
| 164 | +-spec activate_limit_all(qpids(), pid()) -> ok. |
165 | 165 | -spec basic_get(rabbit_types:amqqueue(), pid(), boolean(), pid()) -> |
166 | 166 | {'ok', non_neg_integer(), qmsg()} | 'empty'. |
167 | 167 | -spec credit |
@@ -529,9 +529,15 @@ retry_wait(Q = #amqqueue{pid = QPid, name = Name, state = QState}, F, E, Retries |
529 | 529 | with(Name, F) -> with(Name, F, fun (E) -> {error, E} end). |
530 | 530 |
|
531 | 531 | with_or_die(Name, F) -> |
532 | | - with(Name, F, fun (not_found) -> rabbit_misc:not_found(Name); |
533 | | - ({absent, Q, Reason}) -> rabbit_misc:absent(Q, Reason) |
534 | | - end). |
| 532 | + with(Name, F, die_fun(Name)). |
| 533 | + |
| 534 | +-spec die_fun(name()) -> |
| 535 | + fun((not_found_or_absent()) -> no_return()). |
| 536 | + |
| 537 | +die_fun(Name) -> |
| 538 | + fun (not_found) -> rabbit_misc:not_found(Name); |
| 539 | + ({absent, Q, Reason}) -> rabbit_misc:absent(Q, Reason) |
| 540 | + end. |
535 | 541 |
|
536 | 542 | assert_equivalence(#amqqueue{name = QName, |
537 | 543 | durable = DurableQ, |
|
0 commit comments