From 27d6af0ed32a25d7ea1dcd83a4163f8e6ec67844 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Mon, 14 Feb 2011 10:31:00 +0100 Subject: Corrected spec usage. --- lib/cosTime/src/cosTime.erl | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'lib/cosTime/src/cosTime.erl') 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: -- cgit v1.2.3