Base: rename Exception's PascalCase methods to camelCase

This commit is contained in:
Ladislav Michl
2025-05-01 10:14:18 +02:00
parent bf4ace0957
commit 9683cf1e4f
128 changed files with 394 additions and 394 deletions

View File

@@ -3047,7 +3047,7 @@ bool getIntersectionParameter(const Part::Geometry* geo,
curve->closestParameter(point, pointParam);
}
catch (Base::CADKernelError& e) {
e.ReportException();
e.reportException();
return false;
}
@@ -10116,7 +10116,7 @@ void SketchObject::onChanged(const App::Property* prop)
delete res;
}
} catch (Base::Exception &e) {
e.ReportException();
e.reportException();
FC_ERR("Failed to recompute " << ExpressionEngine.getFullName() << ": "
<< e.what()); // NOLINT
}
@@ -10426,7 +10426,7 @@ void SketchObject::restoreFinished()
}
}
} catch (Base::Exception &e) {
e.ReportException();
e.reportException();
FC_ERR("Error while restoring " << getFullName());
} catch (...) {
}
@@ -11086,7 +11086,7 @@ void SketchObject::setExpression(const App::ObjectIdentifier& path,
}
}
catch (Base::Exception& e) {
e.ReportException();
e.reportException();
FC_ERR("Failed to recompute " << ExpressionEngine.getFullName() << ": " << e.what());
}
solve();

View File

@@ -414,7 +414,7 @@ void CmdSketcherIncreaseKnotMultiplicity::activated(int iMsg)
// particularly B-spline GeoID might have changed.
}
catch (const Base::CADKernelError& e) {
e.ReportException();
e.reportException();
if (e.getTranslatable()) {
Gui::TranslatedUserError(Obj,
QObject::tr("CAD Kernel Error"),
@@ -423,7 +423,7 @@ void CmdSketcherIncreaseKnotMultiplicity::activated(int iMsg)
getSelection().clearSelection();
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
if (e.getTranslatable()) {
Gui::TranslatedUserError(Obj,
QObject::tr("Input Error"),
@@ -789,7 +789,7 @@ public:
// particularly B-spline GeoID might have changed.
}
catch (const Base::CADKernelError& e) {
e.ReportException();
e.reportException();
if (e.getTranslatable()) {
Gui::TranslatedUserError(Obj,
QObject::tr("CAD Kernel Error"),
@@ -797,7 +797,7 @@ public:
}
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
if (e.getTranslatable()) {
Gui::TranslatedUserError(Obj,
QObject::tr("Input Error"),

View File

@@ -358,7 +358,7 @@ public:
tryViewValueChanged(onviewparameterindex, value);
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
}
catch (const std::exception& e) {
Base::Console().Error("C++ exception in onViewValueChanged: %s\n", e.what());

View File

@@ -142,7 +142,7 @@ private:
AutoConstraint::CURVE);
}
catch (Base::ValueError& e) {
e.ReportException();
e.reportException();
}
} break;
default:

View File

@@ -129,7 +129,7 @@ private:
Gui::Command::commitCommand();
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
Gui::NotifyError(sketchgui,
QT_TRANSLATE_NOOP("Notifications", "Error"),
QT_TRANSLATE_NOOP("Notifications", "Failed to rotate"));

View File

@@ -125,7 +125,7 @@ private:
Gui::Command::commitCommand();
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
Gui::NotifyError(sketchgui,
QT_TRANSLATE_NOOP("Notifications", "Error"),
QT_TRANSLATE_NOOP("Notifications", "Failed to scale"));

View File

@@ -145,7 +145,7 @@ private:
Gui::Command::commitCommand();
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
Gui::NotifyError(sketchgui,
QT_TRANSLATE_NOOP("Notifications", "Error"),
QT_TRANSLATE_NOOP("Notifications", "Failed to create symmetry"));

View File

@@ -126,7 +126,7 @@ private:
Gui::Command::commitCommand();
}
catch (const Base::Exception& e) {
e.ReportException();
e.reportException();
Gui::NotifyError(sketchgui,
QT_TRANSLATE_NOOP("Notifications", "Error"),
QT_TRANSLATE_NOOP("Notifications", "Failed to translate"));

View File

@@ -1620,7 +1620,7 @@ Restart:
Base::Console().DeveloperError("EditModeConstraintCoinManager",
"Exception during draw: %s\n",
e.what());
e.ReportException();
e.reportException();
}
catch (...) {
Base::Console().DeveloperError("EditModeConstraintCoinManager",

View File

@@ -431,7 +431,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom
// it is "just" a visualisation matter OCC could not calculate the curvature
// terminating here would mean that the other shapes would not be drawn.
// Solution: Report the issue and set dummy curvature to 0
e.ReportException();
e.reportException();
Base::Console().DeveloperError(
"EditModeGeometryCoinConverter",
"Curvature graph for B-spline with GeoId=%d could not be calculated.\n",

View File

@@ -214,7 +214,7 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge
// it is "just" a visualisation matter OCC could not calculate the curvature
// terminating here would mean that the other shapes would not be drawn.
// Solution: Report the issue and set dummy curvature to 0
e.ReportException();
e.reportException();
Base::Console().DeveloperError(
"EditModeInformationOverlayCoinConverter",
"Curvature graph for B-spline with GeoId=%d could not be calculated.\n",

View File

@@ -492,7 +492,7 @@ void SketcherSettingsDisplay::onBtnTVApplyClicked(bool)
}
catch (Base::PyException& e) {
Base::Console().DeveloperError("SketcherSettings", "error in onBtnTVApplyClicked:\n");
e.ReportException();
e.reportException();
errMsg = QString::fromLatin1(e.what());
}
catch (...) {

View File

@@ -280,7 +280,7 @@ bool SnapManager::snapToObject(double& x, double& y)
pointToOverride = curve->pointAtParameter(pointParam);
}
catch (Base::CADKernelError& e) {
e.ReportException();
e.reportException();
return false;
}

View File

@@ -3078,7 +3078,7 @@ bool ViewProviderSketch::setEdit(int ModNum)
catch (Base::PyException& e) {
Base::Console().DeveloperError(
"ViewProviderSketch", "setEdit: visibility automation failed with an error: \n");
e.ReportException();
e.reportException();
}
}
catch (Base::PyException&) {