The problem here seems to be that the C code you are using does not return
to R. If so, it is nothing to do with try(), and you need to modify the
way you are calling gsl to use a different error handler.
BTW, this seems much more appropriate to R-devel (see the posting guide).
On Mon, 3 Jul
Dear R-experts,
I am running a large simulation exercise where the enough complicated
integration is required.
The integral is computed within a C-function called Denom by use of function
qags from the gsl library.
Here is a piece of R-code: