>
> vous avez essayé un bloc try catch ?
Oui,
J'ai essaye ces 3 options suivantes.
Mais, je ne recupere jamais l'exception.
A mon avis le probleme est dans le code:
if (abs(s.hnext) <= hmin) throw("Step size too small in Odeint");
ou autour.
try {
ode.integrate () ;
}
catch (const std::exception& e) {
catch (string exceptionString) {
catch(terminate& e) {
std::cout << "catched" << std::endl ;
}
>
> Le 12/02/2025 à 17:43, Patrick Dupre a écrit :
> > Si je comprends,
> > C'est cette ligne de code qui genere
> >
> > if (abs(s.hnext) <= hmin) throw("Step size too small in Odeint");
> >
> > terminate called after throwing an instance of 'char const*'
> >
> > Comment je peux recuperer l'exception correctement avec la valeur de hmin ?
> >
> >
> >> Sent: Wednesday, February 12, 2025 at 5:25 PM
> >> From: "Patrick Dupre" <pdupre@???>
> >> To: "Yves Gufflet" <yves.gufflet@???>
> >> Cc: guilde@???
> >> Subject: Re: exception in cpp
> >>
> >>> Je serais moi, je chercherais le code source de
> >>>
> >>> int odeint_I_ct<StepperDopr853<dens_mat_BAP_I_ct> >(BAP_struct_LV const*, double, double**, short) (in /home/pdupre/mylib/libODE_BAP_3_NR3.so.1.0)
> >>>
> >>> pour voir à quel moment elle génère une exception
> >> C'est ce que je ne parviens pas a voir.
> >> Je ne comprends pas pourquoi je ne recupere pas la ligne de code qui me jette.
> >>
> >> avec gdb, je reupere seulement
> >>
> >> terminate called after throwing an instance of 'char const*'
> >>
> >> Program received signal SIGABRT, Aborted.
> >> Downloading 4.06 K source file /usr/src/debug/glibc-2.39-37.fc40.x86_64/nptl/pthread_kill.c
> >> __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
> >> 44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
> >>
> >>
> >>>
> >>> Le 12/02/2025 à 11:07, Patrick Dupre a écrit :
> >>>> int odeint_I_ct<StepperDopr853<dens_mat_BAP_I_ct> >(BAP_struct_LV const*, double, double**, short) (in /home/pdupre/mylib/libODE_BAP_3_NR3.so.1.0)
> >>>
> >>
>
>