On Jun 8, 2010, at 8:39 AM, Chris Fields wrote:
> On Jun 8, 2010, at 12:07 AM, Chris Fields wrote:
>
>> On Jun 7, 2010, at 10:57 PM, Jesse Luehrs wrote:
>>
>>> On Mon, Jun 07, 2010 at 10:54:28PM -0500, Chris Fields wrote:
>>>> I'm seeing an odd error popping up with the latest Moose that's killing
>>>> most of my tests. I'm using a custom error metaclass and am seeing the
>>>> following:
>>>
>>> One of the changes in version 1.05 is that error metaclasses now have to
>>> inherit from Moose::Error::Default. That should probably have made it
>>> into Moose::Manual::Delta, sorry about that(:
>>>
>>> -doy
>>
>> Thanks doy. Tried that and I got the same error unfortunately, but I did
>> manage to get it to work by sticking in an explicit
>> Class::MOP::load_class('Biome::Root::Error'). Notice I also explicitly load
>> the meta class (Biome::Meta::Class) in the below, not doing so also causes
>> errors (this is the Biome Moose-like sugar module):
>
> Spoke too soon! Now I'm seeing a brand new problem. My custom base class
> uses Moose directly (not my Biome sugar class) to avoid recursive
> inheritance. This gives the base class a default error metaclass of
> Moose::Error::Default. If I do something like the following bit of code, it
> fails indicating the error metaclass doesn't match:
...
You can ignore that previous post. After going through the code and seeing how
overly complicated I made things, I decided to go in and dramatically simplify
exception handling, and somehow managed to get everything working using a
custom error metaclass. I may go back to Exception::Class at some point, but
it works great for now. Thanks!
chris