소스 검색

* Fix bug #32446: exception was being eaten by wrong use of try...except

git-svn-id: trunk@37267 -
michael 8 년 전
부모
커밋
d99b19734e
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      packages/fcl-db/src/base/fields.inc

+ 3 - 4
packages/fcl-db/src/base/fields.inc

@@ -2071,11 +2071,10 @@ begin
   If (AValue='') then
     Clear
   else  
-    try
-      f := StrToFloat(AValue);
-      SetAsFloat(f);
-    except
+    begin
+    If not TryStrToFloat(AValue,F) then
       DatabaseErrorFmt(SNotAFloat, [AValue]);
+    SetAsFloat(f);
     end;
 end;