Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looks per domain #783

Merged
merged 1 commit into from Feb 1, 2017
Merged

Conversation

NicolasEYSSERIC
Copy link
Member

See https://tracker.silverpeas.org/issues/3114 for further information

@NicolasEYSSERIC NicolasEYSSERIC force-pushed the ney-feature-3114 branch 2 times, most recently from af0063a to eb9e346 Compare January 30, 2017 14:54
String selectedLook = lookSettings.getString(lookName);
SettingBundle look = ResourceLocator.getSettingBundle(selectedLook);
return look.exists();
} catch (MissingResourceException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When an exception is caught, it is expected one of the two behaviors:

  • log the exception (in this case: SilverLogger.error("Look named '"+lookName+" not found", e), see the exception e logged at the end of the error method)
  • rethrow the exception or throw another exception

When this rules don't need to be applied, then we add an exception to this rule for the incriminated code in our SonarQube.

For your case, in order to determine the better way to handle that, when the method isLookExist is called with a look name as argument, should the name exist in the look settings?

@mmoqui mmoqui merged commit 6ef32bb into Silverpeas:master Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants