Opened 3 years ago

Closed 3 years ago

#5274 closed bug (fixed)

Bad error message

Reported by: augustss Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

From Data.Data

dataTypeConstrs dt = case datarep dt of
                        (AlgRep cons) -> cons
                        _ -> error "dataTypeConstrs"

That error message is a criminal offense. It should at a minimum say what module it comes from.

Change History (1)

comment:1 Changed 3 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

I agree. I've added the module and a bit more to all the calls to error in Data.Data

commit 26b5bd718d5baaf90ed8da9576ba1a090adc7e04
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jul 1 17:59:57 2011 +0100

    Make the calls to 'error' more informative (Trac #5274)

 Data/Data.hs |   90 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 45 insertions(+), 45 deletions(-)
Note: See TracTickets for help on using tickets.