OSDN Git Service

ネットワークがオフラインの時に、送信で例外が発生する不具合の修正
authorh677 <h677>
Sun, 25 Sep 2011 03:47:55 +0000 (03:47 +0000)
committerh677 <h677>
Sun, 25 Sep 2011 03:47:55 +0000 (03:47 +0000)
Editor.pas

index 4258d8d..aeb7304 100644 (file)
@@ -928,6 +928,14 @@ begin
                                raise Exception.Create('');
                        end;
                except
+            on E: EIdSocketError do begin
+                               State := gdsError;
+                               ResponseText := '<html><body>'
+                                                                                       + '<div>\90Ú\91±\82ª\8e¸\94s\82µ\82Ü\82µ\82½<br>'
+                                                                                       + '\89ñ\90ü\82â\83v\83\8d\83L\83V\82Ì\8fó\91Ô\82ð\92²\82×\82Ä\82­\82¾\82³\82¢<br></div>'
+                                                                                       + '<br><br><div>' + E.Message + '</div>'
+                                                                                       + '</body></html>';
+            end;
                        on E: EIdConnectException do begin
                                State := gdsError;
                                ResponseText := '<html><body>'
@@ -962,7 +970,9 @@ begin
        finally
                Source.Free;
                TextStream.Free;
-        Indy.CookieManager.CookieCollection.Clear;
+        if ( Indy.CookieManager <> nil ) then begin
+            Indy.CookieManager.CookieCollection.Clear;
+        end;
                //sysMenu := GetSystemMenu( Handle, true );
                EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
                DrawMenuBar(Handle);