From c27553e1172cd0dcbf95728795e67ab60e730a4b Mon Sep 17 00:00:00 2001 From: kaloyane <kaloyane> Date: Fri, 11 Nov 2011 12:59:48 +0000 Subject: [PATCH] [LMS-2636] introduce UserFailureExceptions whose stack traces can be omitted in the logs (IOptionalStackTraceLoggingException). Mark InvalidSessionException as IOptionStackTraceLoggingException. SVN: 23645 --- .../IOptionalStackTraceLoggingException.java | 26 +++++++++++++++++++ .../exception/InvalidSessionException.java | 8 +++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 common/source/java/ch/systemsx/cisd/common/shared/basic/IOptionalStackTraceLoggingException.java diff --git a/common/source/java/ch/systemsx/cisd/common/shared/basic/IOptionalStackTraceLoggingException.java b/common/source/java/ch/systemsx/cisd/common/shared/basic/IOptionalStackTraceLoggingException.java new file mode 100644 index 00000000000..ea2ac8ccdaf --- /dev/null +++ b/common/source/java/ch/systemsx/cisd/common/shared/basic/IOptionalStackTraceLoggingException.java @@ -0,0 +1,26 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.common.shared.basic; + +/** + * Marker inteface for exceptions whose stack trace can be omitted in logs. + * + * @author Kaloyan Enimanev + */ +public interface IOptionalStackTraceLoggingException +{ +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/exception/InvalidSessionException.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/exception/InvalidSessionException.java index 1c4b7d98d00..c5021f4e323 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/exception/InvalidSessionException.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/exception/InvalidSessionException.java @@ -16,13 +16,15 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.exception; +import ch.systemsx.cisd.common.shared.basic.IOptionalStackTraceLoggingException; + /** - * This <code>UserFailureException</code> extension signals that a <code>Session</code> has - * expired. + * This <code>UserFailureException</code> extension signals that a <code>Session</code> has expired. * * @author Christian Ribeaud */ -public final class InvalidSessionException extends UserFailureException +public final class InvalidSessionException extends UserFailureException implements + IOptionalStackTraceLoggingException { private static final long serialVersionUID = 1L; -- GitLab