Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • orekit/rugged
  • sdinot/rugged
  • yzokras/rugged
  • youngcle/rugged-mod
4 results
Show changes
Showing
with 1873 additions and 1454 deletions
/* Copyright 2013-2016 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
......
/* Copyright 2013-2016 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
......
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You 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.
*/
/**
*
* This package provides the principal class of Rugged library API, as well as
* the builder for Rugged instances.
*
* @author Luc Maisonobe
* @author Guylaine Prat
*
*/
package org.orekit.rugged.api;
/* Copyright 2013-2016 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -27,15 +27,15 @@ import org.hipparchus.exception.LocalizedException;
* the rugged library classes.
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitException},
* This class is heavily based on {@code OrekitException},
* which is distributed under the terms of the Apache License V2.
* </p>
*
* @author Luc Maisonobe
* @author Guylaine Prat
*/
public class RuggedException extends Exception implements LocalizedException {
public class RuggedException extends RuntimeException implements LocalizedException {
/** Serializable UID. */
private static final long serialVersionUID = 20140309L;
......@@ -51,7 +51,7 @@ public class RuggedException extends Exception implements LocalizedException {
* @param specifier format specifier (to be translated)
* @param parts parts to insert in the format (no translation)
*/
public RuggedException(final Localizable specifier, final Object ... parts) {
public RuggedException(final Localizable specifier, final Object... parts) {
this.specifier = specifier;
this.parts = (parts == null) ? new Object[0] : parts.clone();
}
......@@ -63,7 +63,7 @@ public class RuggedException extends Exception implements LocalizedException {
* @param parts parts to insert in the format (no translation)
*/
public RuggedException(final Throwable cause, final Localizable specifier,
final Object ... parts) {
final Object... parts) {
super(cause);
this.specifier = specifier;
this.parts = (parts == null) ? new Object[0] : parts.clone();
......@@ -109,41 +109,8 @@ public class RuggedException extends Exception implements LocalizedException {
* @return a message string
*/
private static String buildMessage(final Locale locale, final Localizable specifier,
final Object ... parts) {
final Object... parts) {
return (specifier == null) ? "" : new MessageFormat(specifier.getLocalizedString(locale), locale).format(parts);
}
/** Create an {@link java.lang.RuntimeException} for an internal error.
* @param cause underlying cause
* @return an {@link java.lang.RuntimeException} for an internal error
*/
public static RuntimeException createInternalError(final Throwable cause) {
/** Format specifier (to be translated). */
final Localizable specifier = RuggedMessages.INTERNAL_ERROR;
/** Parts to insert in the format (no translation). */
final String parts = "rugged-developers@orekit.org";
return new RuntimeException() {
/** Serializable UID. */
private static final long serialVersionUID = 20140309L;
/** {@inheritDoc} */
@Override
public String getMessage() {
return buildMessage(Locale.US, specifier, parts);
}
/** {@inheritDoc} */
@Override
public String getLocalizedMessage() {
return buildMessage(Locale.getDefault(), specifier, parts);
}
};
}
}
/* Copyright 2013-2016 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -22,11 +22,15 @@ package org.orekit.rugged.errors;
* this exception. Typical examples are propagation methods that are used inside Hipparchus
* optimizers, integrators or solvers.</p>
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitException},
* This class is heavily based on {@code OrekitException},
* which is distributed under the terms of the Apache License V2.
* </p>
* @author Luc Maisonobe
* @author Guylaine Prat
* @deprecated as of 2.1, this class is not used anymore, as {@link RuggedException}
* is now an unchecked exception
*/
@Deprecated
public class RuggedExceptionWrapper extends RuntimeException {
/** serializable UID. */
......
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You 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.
*/
/**
*
* This package provides classes to generate and handle exceptions.
*
* @author Luc Maisonobe
* @author Guylaine Prat
*
*/
package org.orekit.rugged.errors;
/* Copyright 2013-2016 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2013-2022 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
......