[Haskell-cafe] How to catch error in array index when debugging

Colin Paul Adams colin at colina.demon.co.uk
Sat Mar 14 10:44:09 EDT 2009


>>>>> "Adrian" == Adrian Neumann <aneumann at inf.fu-berlin.de> writes:

    Adrian> You can use the ghci debugger
    >> http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-
    Adrian> debugger.html

    Adrian> it can set breakpoints on exceptions.

So i tried adding the -fbreak-on-error flag. It made no difference -
it still exited:

<interactive>: Error in array index
<interactive>: interrupted
<interactive>: warning: too many hs_exit()s


    Adrian> Am 14.03.2009 um 09:39 schrieb Colin Paul Adams:

    >> I'm getting a runtime failure "Error in array index". This
    >> causes ghci to exit.
    >> 
    >> Is there a way to get it to break instead, so I can find out
    >> which function is failing?  -- Colin Adams Preston Lancashire

-- 
Colin Adams
Preston Lancashire


More information about the Haskell-Cafe mailing list