From: "Martin Mucha" <mmucha(a)redhat.com>
To: "Greg Sheremeta" <gshereme(a)redhat.com>
Cc: "Frantisek Kobzik" <fkobzik(a)redhat.com>, devel(a)ovirt.org
Sent: Friday, February 20, 2015 11:07:08 AM
Subject: Re: [ovirt-devel] WARNING: trying to localize null, probable error. Exception is
not thrown, returning 'N/A'
No, that warning was created by me, when altering EnumTranslator to remove
few problems of it.
we 'can' just remove the warning, but I do think that trying to localize null
key is just wrong since we're not able to differentiate misuse, lets say
when providing key from variable, and proper localization of null value.
Thus, can somebody explain, why it's valid to trying localize null valued
enum type? If there's need to localize null key, I'd rather opt for having
special method for that to explicitly show programmers intention. But for me
it seems as a call for new properly named enum value.
sorry about any complications with this.
M.
----- Original Message -----
> That's correct.
>
> I think we can just remove the warning. Returning "N/A" seems like a
> fine behavior to me.
>
> Greg
>
> ----- Original Message -----
> > From: "Frantisek Kobzik" <fkobzik(a)redhat.com>
> > To: "Greg Sheremeta" <gshereme(a)redhat.com>
> > Cc: devel(a)ovirt.org
> > Sent: Friday, February 20, 2015 10:33:43 AM
> > Subject: Re: [ovirt-devel] WARNING: trying to localize null, probable
> > error. Exception is not thrown, returning 'N/A'
> >
> > Yeah,
> >
> > I think I was the last who touched that code. IIRC null is passed when a
> > VM
> > doesn't have active graphics (e.g. Down state). I'll take a closer
look.
> >
> > Cheers,
> > F.
> >
> > ----- Original Message -----
> > From: "Greg Sheremeta" <gshereme(a)redhat.com>
> > To: devel(a)ovirt.org
> > Sent: Friday, February 20, 2015 2:31:43 AM
> > Subject: [ovirt-devel] WARNING: trying to localize null, probable error.
> > Exception is not thrown, returning 'N/A'
> >
> > This warning message of $subject is spamming Firebug / Dev tools consoles
> > on
> > latest master.
> >
> > VM tab > Display column is at least one source of it.
> >
> > EnumTranslator is getting nulls passed to translate(). I'm not sure why
> > it's
> > logging about it
> > all of a sudden.
> >
> > Anyone recognize this?
> >
> > Greg Sheremeta
> > Red Hat, Inc.
> > Sr. Software Engineer, RHEV
> > Cell: 919-807-1086
> > gshereme(a)redhat.com
> >
> > _______________________________________________
> > Devel mailing list
> > Devel(a)ovirt.org
> >
http://lists.ovirt.org/mailman/listinfo/devel
> >
> _______________________________________________
> Devel mailing list
> Devel(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/devel
>