From 59bb06a90248defb4c0be98f10afae88c2251fe7 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Thu, 10 Feb 2011 16:18:50 +0100 Subject: Eliminated Dialyzer warnings when using exit or throw. --- lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl index ad3cdb62d4..c251421205 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl @@ -2,10 +2,10 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2009. All Rights Reserved. +%% Copyright Ericsson AB 2000-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in +%% Version 1.1, (the "License"); yu may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. @@ -154,6 +154,9 @@ create_initial_propertyset(_OE_This, State, Properties) -> %%====================================================================== evaluate_propertyset(Sets) -> evaluate_propertyset(Sets, [], []). + +%% To avoid dialyzer warnings due to the use of exit/throw. +-spec(evaluate_propertyset/3 :: (_, _, _) -> no_return()). evaluate_propertyset([], NewProperties, []) -> %% No exceptions found. NewProperties; -- cgit v1.2.3 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/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl index c251421205..1a8f83617a 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl @@ -5,7 +5,7 @@ %% Copyright Ericsson AB 2000-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); yu may not use this file except in +%% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. @@ -155,8 +155,6 @@ create_initial_propertyset(_OE_This, State, Properties) -> evaluate_propertyset(Sets) -> evaluate_propertyset(Sets, [], []). -%% To avoid dialyzer warnings due to the use of exit/throw. --spec(evaluate_propertyset/3 :: (_, _, _) -> no_return()). evaluate_propertyset([], NewProperties, []) -> %% No exceptions found. NewProperties; -- cgit v1.2.3 From a31efb6b4f9581dcd3f52df68fe4704e052e9f20 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Thu, 17 Feb 2011 14:20:54 +0100 Subject: More specs removed. --- .../src/CosPropertyService_PropertySetFactory_impl.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl index 1a8f83617a..4bc29b99ac 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetFactory_impl.erl @@ -153,13 +153,18 @@ create_initial_propertyset(_OE_This, State, Properties) -> %% Internal functions %%====================================================================== evaluate_propertyset(Sets) -> - evaluate_propertyset(Sets, [], []). + case evaluate_propertyset(Sets, [], []) of + {ok, NewProperties} -> + NewProperties; + {error, Exc} -> + corba:raise(#'CosPropertyService_MultipleExceptions'{exceptions = Exc}) + end. evaluate_propertyset([], NewProperties, []) -> %% No exceptions found. - NewProperties; + {ok, NewProperties}; evaluate_propertyset([], _, Exc) -> - corba:raise(#'CosPropertyService_MultipleExceptions'{exceptions = Exc}); + {error, Exc}; evaluate_propertyset([#'CosPropertyService_Property' {property_name = Name, property_value = Value}|T], X, Exc) -> -- cgit v1.2.3