You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the NetworkModification::apply methods that take the throwException boolean in input parameter the use of AbstractNetworkModification::logOrThrow method should be called when the network modification cannot be applied.
This method allows to either log the not applicable reason as a warning (if throwException=false) or to throw a PowsyblException (if throwException=true).
Problem:
Some of the NetworkModification::apply method implementations do not call this method when the modification can not be applied.
Solution:
Fix each of thoses implementations to use the logOrThrow method.
Example:
In ConnectGenerator::apply we throw a PowsyblException in some case, but we should logOrThrow instead (and in case it is a log we should then return):
Replace
thrownewPowsyblException("Generator '" + generatorId + "' not found");
With
logOrThrow(throwException, "Generator '" + generatorId + "' not found");
return;
The text was updated successfully, but these errors were encountered:
In the
NetworkModification::apply
methods that take thethrowException
boolean in input parameter the use ofAbstractNetworkModification::logOrThrow
method should be called when the network modification cannot be applied.This method allows to either log the not applicable reason as a warning (if
throwException=false
) or to throw aPowsyblException
(ifthrowException=true
).Problem:
Some of the
NetworkModification::apply
method implementations do not call this method when the modification can not be applied.Solution:
Fix each of thoses implementations to use the
logOrThrow
method.Example:
In
ConnectGenerator::apply
we throw aPowsyblException
in some case, but we shouldlogOrThrow
instead (and in case it is a log we should then return):Replace
With
The text was updated successfully, but these errors were encountered: