]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.repo/src/org/eclipse/aether/RepositoryException.java
1 /*******************************************************************************
2 * Copyright (c) 2010, 2014 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
;
14 * The base class for exceptions thrown by the repository system. <em>Note:</em> Unless otherwise noted, instances of
15 * this class and its subclasses will not persist fields carrying extended error information during serialization.
17 public class RepositoryException
22 * Creates a new exception with the specified detail message.
24 * @param message The detail message, may be {@code null}.
26 public RepositoryException( String message
)
32 * Creates a new exception with the specified detail message and cause.
34 * @param message The detail message, may be {@code null}.
35 * @param cause The exception that caused this one, may be {@code null}.
37 public RepositoryException( String message
, Throwable cause
)
39 super( message
, cause
);
43 * @noreference This method is not intended to be used by clients.
44 * @param prefix A message prefix for the cause.
45 * @param cause The error cause.
46 * @return The error message for the cause.
48 protected static String
getMessage( String prefix
, Throwable cause
)
53 msg
= cause
.getMessage();
54 if ( msg
== null || msg
.length() <= 0 )
56 msg
= cause
.getClass().getSimpleName();