Show proper error message if registering email address fails
Users can register new email address under 'Settings > Contact Information'. If the registration fails, e.g. because the mail server is incorrectly configured or because the mail server refuses to send the email, an error dialog with 'Code Review - Error > Server Error > [message]' is displayed which makes the user think that there is something wrong with Gerrit. Slightly improve the error reporting by setting a proper title for the error dialog and removing 'Server Error' from the message. Bug: issue 1480 Change-Id: I788e5bdf69aaaee17a1fd468f81d3effaa13a624 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2009 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.common.errors;
|
||||
|
||||
public class EmailException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String MESSAGE = "Mail Error: ";
|
||||
|
||||
public EmailException(String msg) {
|
||||
super(MESSAGE + msg);
|
||||
}
|
||||
|
||||
public EmailException(String msg, Throwable why) {
|
||||
super(MESSAGE + msg, why);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user