diff options
author | Niclas Eklund <[email protected]> | 2011-02-14 10:31:00 +0100 |
---|---|---|
committer | Niclas Eklund <[email protected]> | 2011-02-14 10:31:00 +0100 |
commit | 27d6af0ed32a25d7ea1dcd83a4163f8e6ec67844 (patch) | |
tree | 0ac6f83ff66ec08f72d6a39f6cba386ebb0fa65e /lib/cosTime/src/cosTime.erl | |
parent | 59bb06a90248defb4c0be98f10afae88c2251fe7 (diff) | |
download | otp-27d6af0ed32a25d7ea1dcd83a4163f8e6ec67844.tar.gz otp-27d6af0ed32a25d7ea1dcd83a4163f8e6ec67844.tar.bz2 otp-27d6af0ed32a25d7ea1dcd83a4163f8e6ec67844.zip |
Corrected spec usage.
Diffstat (limited to 'lib/cosTime/src/cosTime.erl')
-rw-r--r-- | lib/cosTime/src/cosTime.erl | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/cosTime/src/cosTime.erl b/lib/cosTime/src/cosTime.erl index 3f6050444a..b02cb72509 100644 --- a/lib/cosTime/src/cosTime.erl +++ b/lib/cosTime/src/cosTime.erl @@ -110,30 +110,34 @@ uninstall_time() -> uninstall_timerevent() -> uninstall_loop(lists:reverse(?IDL_TIMEREVENT_MODULES),ok). -%% To avoid dialyzer warnings due to the use of exit/throw. --spec(uninstall_loop/2 :: (_, _) -> no_return()). uninstall_loop([],ok) -> ok; uninstall_loop([],{exit, register}) -> - exit({?MODULE, "oe_register failed"}); + do_exit({?MODULE, "oe_register failed"}); uninstall_loop([],{exit, unregister}) -> - exit({?MODULE, "oe_unregister failed"}); + do_exit({?MODULE, "oe_unregister failed"}); uninstall_loop([],{exit, both}) -> - exit({?MODULE, "oe_register and, for some of those already registered, oe_unregister failed"}); + do_exit({?MODULE, "oe_register and, for some of those already registered, oe_unregister failed"}); uninstall_loop([H|T], Status) -> case catch H:'oe_unregister'() of ok -> uninstall_loop(T, Status); _ when Status == ok -> - ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered. -You are adviced to confirm this.~n",[H]), + ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered.\n" + "You are adviced to confirm this.~n",[H]), uninstall_loop(T, {exit, unregister}); _ -> - ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered. -You are adviced to confirm this.~n",[H]), + ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered.\n" + "You are adviced to confirm this.~n",[H]), uninstall_loop(T, {exit, both}) end. - + + +%% To avoid dialyzer warnings due to the use of exit/throw. +-spec(do_exit/1 :: (_) -> no_return()). +do_exit(Reason) -> + exit(Reason). + %%------------------------------------------------------------ %% function : start/stop %% Arguments: |