Skip to content

feat: Refactor exception handling to use a new templated base excepti… - #533

Open
97gamjak wants to merge 4 commits into
devfrom
cleanup-exceptions
Open

feat: Refactor exception handling to use a new templated base excepti…#533
97gamjak wants to merge 4 commits into
devfrom
cleanup-exceptions

Conversation

@97gamjak

Copy link
Copy Markdown
Collaborator

…on class

  • Introduced a new base exception class BaseException that utilizes template parameters for color and type, improving the handling of custom exceptions.
  • Updated existing tests to replace references to customException with the new exc namespace.
  • Modified exception throwing in various test files to align with the new exception handling structure.
  • Added new exception types to exceptionTypes.hpp for better categorization of errors.
  • Implemented colorful output for exception messages to enhance visibility in logs.

…on class

- Introduced a new base exception class `BaseException` that utilizes template parameters for color and type, improving the handling of custom exceptions.
- Updated existing tests to replace references to `customException` with the new `exc` namespace.
- Modified exception throwing in various test files to align with the new exception handling structure.
- Added new exception types to `exceptionTypes.hpp` for better categorization of errors.
- Implemented colorful output for exception messages to enhance visibility in logs.
@97gamjak
97gamjak requested review from ape33 and galjos August 26, 2026 14:49
@97gamjak 97gamjak linked an issue Aug 26, 2026 that may be closed by this pull request
@pq-perf-bot

pq-perf-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

⚡ Performance (instruction count) — ✅ no regressions

per-benchmark breakdown
benchmark base Ir PR Ir Δ
bondedForces 38.24M 38.24M -0.00%
boxTransforms 10.67M 10.67M +0.00%
constraints 11.06M 11.06M +0.00%
coulombKernel 5.80M 5.80M +0.00%
forceKernel 14.16M 14.16M +0.00%
integrator 32.91M 32.91M +0.00%
interWater 1679.92M 1679.92M +0.00%
kinetics 8.55M 8.55M +0.00%
linearAlgebra 2.08M 2.08M +0.00%
nonCoulombPairs 5.48M 5.48M +0.00%
shiftVector 5.81M 5.81M +0.00%
virial 9.10M 9.10M -0.00%

Deterministic callgrind instruction counts vs the base branch; gated at ±2%. Not wall-clock.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.59574% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.43%. Comparing base (89de594) to head (61405c2).

Files with missing lines Patch % Lines
src/timings/timer.cpp 0.00% 3 Missing ⚠️
src/constraints/mShake.cpp 33.33% 2 Missing ⚠️
src/exceptions/baseException.cpp 85.71% 2 Missing ⚠️
include/exceptions/exceptionTypes.hpp 0.00% 1 Missing ⚠️
include/linearAlgebra/matrix/matrixClass.tpp.hpp 0.00% 1 Missing ⚠️
src/input/inputFileReader.cpp 66.66% 1 Missing ⚠️
src/utilities/stringUtilities.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #533      +/-   ##
==========================================
+ Coverage   91.33%   91.43%   +0.10%     
==========================================
  Files         321      323       +2     
  Lines       14747    14660      -87     
  Branches     4943     4926      -17     
==========================================
- Hits        13469    13405      -64     
+ Misses       1193     1170      -23     
  Partials       85       85              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use NTTP for exceptions

1 participant