1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

[226374] [api] Add SystemLockTimeoutException

This commit is contained in:
Martin Oberhuber 2008-05-07 00:41:52 +00:00
parent 54704921ea
commit 4d5ee26ab3
4 changed files with 57 additions and 0 deletions

View file

@ -29,6 +29,7 @@ public class CommonMessages extends NLS {
public static String MSG_COMM_AUTH_FAILED;
public static String MSG_COMM_AUTH_FAILED_DETAILS;
public static String MSG_COMM_NETWORK_ERROR;
public static String MSG_LOCK_TIMEOUT;
public static String MSG_EXPAND_FAILED;
public static String MSG_EXPAND_CANCELLED;

View file

@ -27,6 +27,7 @@ MSG_COMM_AUTH_FAILED_DETAILS=Authentication with {0} failed because the password
MSG_COMM_NETWORK_ERROR=Operation failed due to network I/O error ''{0}''
MSG_ERROR_UNEXPECTED=An unexpected error occurred.
MSG_LOCK_TIMEOUT=A timeout occurred while trying to acquire a shared resource.
MSG_EXPAND_FAILED = Expand failed. Try again

View file

@ -48,6 +48,7 @@ public interface ICommonMessageIds {
public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //$NON-NLS-1$
public static final String MSG_ERROR_UNEXPECTED = "RSEG8002"; //$NON-NLS-1$
public static final String MSG_LOCK_TIMEOUT = "RSEG9999";//FIXME //$NON-NLS-1$
public static final String MSG_COMM_AUTH_FAILED = "RSEC1002"; //$NON-NLS-1$
public static final String MSG_COMM_PWD_INVALID = "RSEC1004"; //$NON-NLS-1$

View file

@ -0,0 +1,54 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Martin Oberhuber (Wind River) - initial API and implementation
*******************************************************************************/
package org.eclipse.rse.services.clientserver.messages;
import org.eclipse.core.runtime.IStatus;
/**
* Exception thrown when a remote operation requires an exclusive lock on some
* resources, such as a shared Mutex for some channel, and a timeout occurs
* acquiring that resource.
*
* @since 3.0
*/
public class SystemLockTimeoutException extends SystemMessageException {
/**
* A serialVersionUID is recommended for all serializable classes. This
* trait is inherited from Throwable. This should be updated if there is a
* schema change for this class.
*/
private static final long serialVersionUID = 1L;
/**
* . * Default Constructor
*
* @param pluginId ID of the plugin in which the problem occurred.
*/
public SystemLockTimeoutException(String pluginId) {
super(getMyMessage(pluginId, null));
}
/**
* Constructor with a detail message.
*
* @param pluginId ID of the plugin in which the problem occurred.
*/
public SystemLockTimeoutException(String pluginId, String detailMsg) {
super(getMyMessage(pluginId, detailMsg));
}
private static SystemMessage getMyMessage(String pluginId, String detailMsg) {
return new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_LOCK_TIMEOUT, IStatus.ERROR, CommonMessages.MSG_LOCK_TIMEOUT, detailMsg);
}
}