Repository navigation
Move error logging from SciMLBase to DiffEqBase - #1504
Merged
Merged
Conversation
Comment on lines
+903
to
+920
| """ | ||
| report_integrator_failure(integrator, ::Val{reason}) | ||
|
|
||
| Report a failure mode detected,called immediately | ||
| before the corresponding return code is returned. `reason` is one | ||
| of `:dt_NaN`, `:max_iters`, `:dt_min_unstable`, `:dt_epsilon`, `:instability` or | ||
| `:newton_convergence`. | ||
|
|
||
| `check_error` only detects failures; describing them belongs to the solver stack, | ||
| which owns both the wording and the verbosity settings that gate it. DiffEqBase.jl | ||
| implements this for `DEIntegrator`s. The default is a no-op, so a stack that does not | ||
| implement it still gets correct return codes, just no diagnostics. | ||
|
|
||
| Implementations must not affect control flow and their return value is ignored. A | ||
| `reason` configured at `SciMLLogging.ErrorLevel` throws instead of returning, which is | ||
| the intended behaviour of that level. | ||
| """ | ||
| @inline report_integrator_failure(integrator, ::Val) = nothing |
Member
There was a problem hiding this comment.
Who consumes this that isn't DiffEqBase?
Comment on lines
+984
to
989
|
|
||
| Diagnostics for detected failures are emitted through | ||
| [`report_integrator_failure`](@ref), which the solver stack implements; this | ||
| function only performs detection. | ||
| """ | ||
| function check_error(integrator::DEIntegrator) |
Member
There was a problem hiding this comment.
Who consumes this that isn't DiffEqBase?
Contributor
Author
There was a problem hiding this comment.
So the answer is that its only DiffEqBase, but when I dropped check_error entirely from SciMLBase, there didn't seem to be a clean way to merge everything in one go without breaking one of DiffEqBase or SciMLBase (or a relevant dep), so the best solution I could think of was a more gradual approach, so we leave this small bit for now, and gradually migrate everything to make sure that we do this right.
This was referenced Aug 14, 2026
Open
Comment on lines
+2368
to
+2369
| # Integrator diagnostic hooks | ||
| @public report_integrator_failure |
Member
There was a problem hiding this comment.
why would this be public if it's being removed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
A follow-up PR will be opened to OrdinaryDiffEq for the second half of this work.