# Errors pdemagic raises one of four errors, all of them subclasses of `pm.PdemagicError`. Each carries a message that names what was found. | Error | In short | |---|---| | `InvalidProblemError` | The problem is inconsistent or incomplete, or has no solution. | | `UnsupportedProblemError` | The problem is fine, and pdemagic cannot solve it yet. | | `InvalidPlanError` | The plan does not fit the problem. | | `ConvergenceError` | An iteration or a time stepping did not reach its tolerance. | ```{eval-rst} .. autoexception:: pdemagic.PdemagicError ``` It is never raised itself. Catch it to catch every error that pdemagic raises. ```{eval-rst} .. autoexception:: pdemagic.InvalidProblemError ``` It is raised when a problem is built, planned or solved and is inconsistent or incomplete, or has no unique solution: a face without a condition, an unknown without an initial value, a symbol that is not a coordinate, a box that resonates. The message says what is wrong, and the remedy is to correct the problem. ```{eval-rst} .. autoexception:: pdemagic.UnsupportedProblemError ``` It is raised by `pm.plan` and `pm.solve` when the problem is well formed and no method takes it yet. The message names what it found, and often the form that is taken instead. [What is solved where](equations.md) lists the forms, and the page of [known limits](../dev/limits.md) everything that is refused. ```{eval-rst} .. autoexception:: pdemagic.InvalidPlanError ``` It is raised by `pm.solve` when the plan that it is given cannot be read or does not fit the problem: a method that is not known or does not apply to the domain, a grid with the wrong number of axes. Start again from `pm.plan(problem)` and change single entries. ```{eval-rst} .. autoexception:: pdemagic.ConvergenceError ``` It is raised by `pm.solve` when an iteration, Newton's method or a time stepping did not reach its tolerance within its steps. No result is returned. Raise `method.max_iterations` or `method.max_steps` in the plan, loosen `method.tolerance`, refine the grid, or give Newton's method another `guess`. See also: [The planner and its plan](../topics/planner.md) and [Accuracy and diagnostics](../topics/accuracy.md).