Intercepting Fortran exceptions

This is a discussion on Intercepting Fortran exceptions within the C++ Programming forums, part of the General Programming Boards category; Hi there, Does anyone know how to catch fortran exceptions, thrown in a Fortran function which I call from C++? ...

  1. #1
    Registered User
    Join Date
    May 2008
    Location
    Paris
    Posts
    248

    Intercepting Fortran exceptions

    Hi there,

    Does anyone know how to catch fortran exceptions, thrown in a Fortran function which I call from C++? I don't know how these exceptions are defined, the .dll and .so is the only thing I've got.
    Am I doomed?


    Thanks a lot!!

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    As far as I know, FORTRAN doesn't have exceptions (unless you're using something newfangled like F# for a language that should have died a long time ago).

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Unless it's about floating point/math exceptions, such as divide by zero or memory exceptions such as out of bounds memory accesses. Those would be catchable with Windows exception handling or Unix signals, but not standard C++ exception handling.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. real-world apps in C++ (preferably simple)?
    By Aisthesis in forum C++ Programming
    Replies: 13
    Last Post: 06-12-2009, 02:03 PM
  2. Its About Fortran
    By panfilero in forum Tech Board
    Replies: 2
    Last Post: 11-29-2005, 07:49 AM
  3. need some help with fortran
    By InvariantLoop in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-08-2005, 03:13 AM
  4. Linking Fortran procedures with C program
    By gest in forum C Programming
    Replies: 5
    Last Post: 07-14-2003, 01:35 PM
  5. Throwing exceptions with constructors
    By nickname_changed in forum C++ Programming
    Replies: 14
    Last Post: 07-08-2003, 10:21 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21