# How to get a value from Error message? [duplicate]

I've looked pretty hard for a solution to this issue with no luck. Hope you could give me a clue:

When I run NDSolve I get the following error msg:

NDSolveValue::ndsz: At t == 8.26993343406667, step size is effectively zero; singularity or stiff system suspected.
`

The singularity is expected at this value and I wonder if I can automatically make the code run from 0 to the value from the error message. (the value changes every time so i can't just change the solution region.)

Thanks, Ofek.

• If the solutions in the linked thread do not solve your problem, please edit your question to explain why they don't work, so we can release the hold. – J. M. will be back soon Oct 2 '18 at 20:05
• The linked thread is exactly what i was looking for. Somehow I've missed that one. Thanks alot! – Ofek Peretz Oct 2 '18 at 20:16