This allows to do checks on Gerrit startup and abort the Gerrit startup if issues are found. E.g. this allows us to do validation on the Gerrit config, which is needed by a follow-up change. The startup checks are done after all lifecycle listeners have been invoked so that logging is already available and the reason for a failing startup can be written to the error log. All implementations of StartupCheck should be bound in StartupChecks.Module. Change-Id: I941dad2c926130a1f9c5a1a363f7e1eff0dab304 Signed-off-by: Edwin Kempin <ekempin@google.com>
28 lines
916 B
Java
28 lines
916 B
Java
// Copyright (C) 2017 The Android Open Source Project
|
|
//
|
|
// 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 com.google.gerrit.server;
|
|
|
|
public class StartupException extends RuntimeException {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
public StartupException(String message) {
|
|
super(message);
|
|
}
|
|
|
|
public StartupException(String message, Throwable cause) {
|
|
super(message, cause);
|
|
}
|
|
}
|