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. --- .../src/CosPropertyService_PropertySetDefFactory_impl.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl index b099026b88..45fd097bff 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl @@ -2,7 +2,7 @@ %% %% %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 @@ -153,6 +153,9 @@ create_initial_propertysetdef(_OE_This, State, PropDefs) -> %%====================================================================== evaluate_propertysetdef(SetDefs) -> evaluate_propertysetdef(SetDefs, [], []). + +%% To avoid dialyzer warnings due to the use of exit/throw. +-spec(evaluate_propertysetdef/3 :: (_, _, _) -> no_return()). evaluate_propertysetdef([], 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_PropertySetDefFactory_impl.erl | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl index 45fd097bff..82bc00aa7f 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl @@ -154,8 +154,6 @@ create_initial_propertysetdef(_OE_This, State, PropDefs) -> evaluate_propertysetdef(SetDefs) -> evaluate_propertysetdef(SetDefs, [], []). -%% To avoid dialyzer warnings due to the use of exit/throw. --spec(evaluate_propertysetdef/3 :: (_, _, _) -> no_return()). evaluate_propertysetdef([], 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_PropertySetDefFactory_impl.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl') diff --git a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl index 82bc00aa7f..202df42b61 100644 --- a/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl +++ b/lib/cosProperty/src/CosPropertyService_PropertySetDefFactory_impl.erl @@ -152,13 +152,18 @@ create_initial_propertysetdef(_OE_This, State, PropDefs) -> %% Internal functions %%====================================================================== evaluate_propertysetdef(SetDefs) -> - evaluate_propertysetdef(SetDefs, [], []). + case evaluate_propertysetdef(SetDefs, [], []) of + {ok, NewProperties} -> + NewProperties; + {error, Exc} -> + corba:raise(#'CosPropertyService_MultipleExceptions'{exceptions = Exc}) + end. evaluate_propertysetdef([], NewProperties, []) -> %% No exceptions found. - NewProperties; + {ok, NewProperties}; evaluate_propertysetdef([], _, Exc) -> - corba:raise(#'CosPropertyService_MultipleExceptions'{exceptions = Exc}); + {error, Exc}; evaluate_propertysetdef([#'CosPropertyService_PropertyDef' {property_name = Name, property_value = Value, -- cgit v1.2.3