[Tween-svn] [1367] EnumとInt32との比較でクラッシュしていたのをとりあえず落ちないように

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 1月 18日 (火) 23:12:55 JST


Revision: 1367
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1367
Author:   syo68k
Date:     2011-01-18 23:12:55 +0900 (Tue, 18 Jan 2011)

Log Message:
-----------
EnumとInt32との比較でクラッシュしていたのをとりあえず落ちないように

Modified Paths:
--------------
    trunk/Tween/Dynamic.vb


-------------- next part --------------
Modified: trunk/Tween/Dynamic.vb
===================================================================
--- trunk/Tween/Dynamic.vb	2011-01-18 13:05:41 UTC (rev 1366)
+++ trunk/Tween/Dynamic.vb	2011-01-18 14:12:55 UTC (rev 1367)
@@ -1468,7 +1468,11 @@
                         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



Tween-svn メーリングリストの案内
Back to archive index