#926 ✓resolved
dan (at angryamoeba)

Sweatshop exceptions don't extend StandardError

Reported by dan (at angryamoeba) | June 26th, 2009 @ 10:29 AM | in 0.10.0

Just as the ticket title suggests, the following code should successfully rescue the raised exception:

DataMapper::Sweatshop::NoFixtureExist: nonsense fixture was not found for class User
    from /Users/danski/Sites/vj-next/vj-core/gems/gems/dm-sweatshop-0.10.0/lib/dm-sweatshop/sweatshop.rb:122:in `attributes'
    from /Users/danski/Sites/vj-next/vj-core/gems/gems/dm-sweatshop-0.10.0/lib/dm-sweatshop/sweatshop.rb:75:in `create'
    from /Users/danski/Sites/vj-next/vj-core/gems/gems/dm-sweatshop-0.10.0/lib/dm-sweatshop/model.rb:38:in `gen'
    from (irb):10
    from :0

Comments and changes to this ticket

  • Martin Gamsjaeger (snusnu)

    Martin Gamsjaeger (snusnu) July 9th, 2009 @ 01:45 PM

    • State changed from “new” to “unconfirmed”


    As you can see below, I get the expected behavior. I tried that against current next branches as of today, so I wonder if this could be marked as resolved?

    mungo:dm-more snusnu$ irb
    irb(main):001:0> require "rubygems"
    => true
    irb(main):002:0> require "dm-core"
    => true
    irb(main):003:0> require "dm-sweatshop"
    => true
    irb(main):005:0* begin
    irb(main):006:1*   User.gen(:nonsense)
    irb(main):007:1> rescue 
    irb(main):008:1>   :foo
    irb(main):009:1> end
    => :foo
  • dan (at angryamoeba)

    dan (at angryamoeba) July 9th, 2009 @ 04:51 PM

    That looks fixed to me. Thanks for looking into it!

  • Martin Gamsjaeger (snusnu)

    Martin Gamsjaeger (snusnu) July 9th, 2009 @ 07:58 PM

    • State changed from “unconfirmed” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »