[Mono-bugs] [Bug 340799] New: Missing enum validation

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 9 16:56:05 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=340799

           Summary: Missing enum validation
           Product: Moonlight
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: engine
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: spouliot at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


Silverlight validates the enum values on it's object properties, both directly
and indirectly (via SetValue). Invalid values throws a System.Exception saying
"Catastrophic error..."

Moonlight doesn't validate the enum values.

E.g.

Ellipse el = new Ellipse ();
try {
    el.StrokeStartLineCap = (PenLineCap) (-1);
    Console.WriteLine ("el.StrokeStartLineCap = (PenLineCap) (-1);");
}
catch (Exception ex) {
    Console.WriteLine (ex.ToString ());
}
try {
    el.SetValue (Ellipse.StrokeStartLineCapProperty, (PenLineCap) (-1));
    Console.WriteLine ("el.SetValue (Ellipse.StrokeStartLineCapProperty,
(PenLineCap) (-1));");
}
catch (Exception ex) {
    Console.WriteLine (ex.ToString ());
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list