OSDN Git Service

EnumとInt32との比較でクラッシュしていたのをとりあえず落ちないように
authorsyo68k <syo68k@users.sourceforge.jp>
Tue, 18 Jan 2011 14:12:55 +0000 (14:12 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:18:32 +0000 (23:18 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1367 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Dynamic.vb

index 1290d75..9bc405f 100644 (file)
@@ -1468,7 +1468,11 @@ amphersand:
                         Case TypeCode.String
                             value = ParseEnum(text, target)
                     End Select
-                    If value IsNot Nothing Then Return Expression.Constant(value, type)
+                    Try
+                        If value IsNot Nothing Then Return Expression.Constant(value, type)
+                    Catch ex As Exception
+                        Throw ParseError(Res.ExpressionExpected)
+                    End Try
                 End If
             End If
         End If