Packages
brod
4.5.7
4.5.7
4.5.6
4.5.5
4.5.4
4.5.3
4.5.2
4.5.1
4.5.0
4.4.7
4.4.6
4.4.5
4.4.4
4.4.3
4.4.2
4.4.1
4.4.0
4.3.3
4.3.2
4.3.1
4.3.0
4.2.0
4.1.1
4.1.0
4.0.0
3.19.1
3.19.0
3.18.0
3.17.1
3.17.0
3.16.5
3.16.4
3.16.3
3.16.2
3.16.1
3.16.0
3.15.6
3.15.5
3.15.4
3.15.3
3.15.1
3.15.0
3.14.0
3.13.0
3.12.0
3.11.0
3.10.0
3.9.5
3.9.3
3.9.2
3.9.1
3.9.0
3.8.1
3.8.0
3.7.11
3.7.10
3.7.9
3.7.8
3.7.7
3.7.6
3.7.5
3.7.4
3.7.3
3.7.2
3.7.1
3.7.0
3.6.2
3.6.1
3.6.0
3.5.2
3.5.1
3.5.0
3.4.0
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.0
3.0.0
2.5.0
2.4.1
2.4.0
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.1
2.2.16
2.2.15
2.2.14
2.2.12
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.12
2.1.11
2.1.10
2.1.8
2.1.7
2.1.4
2.1.2
2.0.0
Apache Kafka Erlang client library
Current section
113 Versions
Jump to
Current section
113 Versions
Compare versions
4
files changed
+28
additions
-19
deletions
| @@ -24,4 +24,4 @@ | |
| 24 24 | [{<<"app">>,<<"kafka_protocol">>}, |
| 25 25 | {<<"optional">>,false}, |
| 26 26 | {<<"requirement">>,<<"4.3.4">>}]}]}. |
| 27 | - {<<"version">>,<<"4.5.6">>}. |
| 27 | + {<<"version">>,<<"4.5.7">>}. |
| @@ -9,7 +9,7 @@ | |
| 9 9 | {test, [ |
| 10 10 | {deps, [ {hut, "1.3.0"} |
| 11 11 | , {jsone, "1.7.0"} |
| 12 | - , {meck, "0.9.2"} |
| 12 | + , {meck, "1.2.0"} |
| 13 13 | , {proper, "1.5.0"} |
| 14 14 | , {snappyer, "1.2.9"} |
| 15 15 | , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {branch, "1.0.10"}}} |
| @@ -1,6 +1,6 @@ | |
| 1 1 | {application,brod, |
| 2 2 | [{description,"Apache Kafka Erlang client library"}, |
| 3 | - {vsn,"4.5.6"}, |
| 3 | + {vsn,"4.5.7"}, |
| 4 4 | {registered,[]}, |
| 5 5 | {applications,[kernel,stdlib,kafka_protocol]}, |
| 6 6 | {env,[]}, |
| @@ -408,7 +408,7 @@ start_children([], NChildren, _SupName) -> | |
| 408 408 | |
| 409 409 | do_start_child(SupName, Child) -> |
| 410 410 | #child{mfargs = {M, F, Args}} = Child, |
| 411 | - case catch apply(M, F, Args) of |
| 411 | + try apply(M, F, Args) of |
| 412 412 | {ok, Pid} when is_pid(Pid) -> |
| 413 413 | NChild = Child#child{pid = Pid}, |
| 414 414 | report_progress(NChild, SupName), |
| @@ -419,12 +419,13 @@ do_start_child(SupName, Child) -> | |
| 419 419 | {ok, Pid, Extra}; |
| 420 420 | ignore -> |
| 421 421 | {ok, undefined}; |
| 422 | - {error, What} -> {error, What}; |
| 423 | - What -> {error, What} |
| 422 | + {error, What} -> {error, What} |
| 423 | + catch |
| 424 | + C:What -> {error, {C, What}} |
| 424 425 | end. |
| 425 426 | |
| 426 427 | do_start_child_i(M, F, A) -> |
| 427 | - case catch apply(M, F, A) of |
| 428 | + try apply(M, F, A) of |
| 428 429 | {ok, Pid} when is_pid(Pid) -> |
| 429 430 | {ok, Pid}; |
| 430 431 | {ok, Pid, Extra} when is_pid(Pid) -> |
| @@ -432,9 +433,10 @@ do_start_child_i(M, F, A) -> | |
| 432 433 | ignore -> |
| 433 434 | {ok, undefined}; |
| 434 435 | {error, Error} -> |
| 435 | - {error, Error}; |
| 436 | - What -> |
| 437 | - {error, What} |
| 436 | + {error, Error} |
| 437 | + catch |
| 438 | + C:What -> |
| 439 | + {error, {C, What}} |
| 438 440 | end. |
| 439 441 | |
| 440 442 | %%% --------------------------------------------------- |
| @@ -754,15 +756,16 @@ terminate(_Reason, State) -> | |
| 754 756 | code_change(_, State, _) -> |
| 755 757 | case (State#state.module):init(State#state.args) of |
| 756 758 | {ok, {SupFlags, StartSpec}} -> |
| 757 | - case catch check_flags(SupFlags) of |
| 759 | + try check_flags(SupFlags) of |
| 758 760 | ok -> |
| 759 761 | {Strategy, MaxIntensity, Period} = SupFlags, |
| 760 762 | update_childspec(State#state{strategy = Strategy, |
| 761 763 | intensity = MaxIntensity, |
| 762 764 | period = Period}, |
| 763 | - StartSpec); |
| 764 | - Error -> |
| 765 | - {error, Error} |
| 765 | + StartSpec) |
| 766 | + catch |
| 767 | + C:Error -> |
| 768 | + {error, {C, Error}} |
| 766 769 | end; |
| 767 770 | ignore -> |
| 768 771 | {ok, State}; |
| @@ -1419,13 +1422,14 @@ remove_child(Child, State) -> | |
| 1419 1422 | %% Returns: {ok, state()} | Error |
| 1420 1423 | %%----------------------------------------------------------------- |
| 1421 1424 | do_init(SupName, Type, StartSpec, Mod, Args) -> |
| 1422 | - case catch init_state(SupName, Type, Mod, Args) of |
| 1425 | + try init_state(SupName, Type, Mod, Args) of |
| 1423 1426 | {ok, State} when ?is_simple(State) -> |
| 1424 1427 | init_dynamic(State, StartSpec); |
| 1425 1428 | {ok, State} -> |
| 1426 | - init_children(State, StartSpec); |
| 1427 | - Error -> |
| 1428 | - {stop, {supervisor_data, Error}} |
| 1429 | + init_children(State, StartSpec) |
| 1430 | + catch |
| 1431 | + C:Error -> |
| 1432 | + {stop, {supervisor_data, {C, Error}}} |
| 1429 1433 | end. |
| 1430 1434 | |
| 1431 1435 | init_state(SupName, {Strategy, MaxIntensity, Period}, Mod, Args) -> |
| @@ -1489,7 +1493,12 @@ check_startspec([], Res) -> | |
| 1489 1493 | {ok, lists:reverse(Res)}. |
| 1490 1494 | |
| 1491 1495 | check_childspec({Name, Func, RestartType, Shutdown, ChildType, Mods}) -> |
| 1492 | - catch check_childspec(Name, Func, RestartType, Shutdown, ChildType, Mods); |
| 1496 | + try |
| 1497 | + check_childspec(Name, Func, RestartType, Shutdown, ChildType, Mods) |
| 1498 | + catch |
| 1499 | + C:Reason -> |
| 1500 | + {C, Reason} |
| 1501 | + end; |
| 1493 1502 | check_childspec(X) -> {invalid_child_spec, X}. |
| 1494 1503 | |
| 1495 1504 | check_childspec(Name, Func, RestartType, Shutdown, ChildType, Mods) -> |