Jump to content

Lars Fosdal

Administrators
  • Content Count

    3524
  • Joined

  • Last visited

  • Days Won

    116

Posts posted by Lars Fosdal


  1. 9 minutes ago, Die Holländer said:

    I use Azure cloud with MSSQL (free edition), FireDac and works great. I pay about 5 Euro per month.

    Is there a limit on usage at that price? Can a DB there be accessed from multiple concurrent instances of your app?


  2. @A.M. Hoornweg Passing the exception type and callstack info from the server would be useful for making an educated handling in the client, but I don't see why raising an exception in the client would be helpful. The callstack from the server side exception won't be the same as the callstack from an exception raised in the client,. It all depends on the client-side context, of course, so sometimes an exception may be acceptable, but frankly; I prefer to not raise an exception if I can handle a problem flow in a better way.

     


  3. 3 hours ago, JIMSMITH said:

    Just not sure how to implement this in a middle tier where I want the exception to be passed back to the client.

    It isn't worse than your response having result codes that indicate success + data, or failure + type of failure, and your client responding to these the way you want it to.

     

    F.x
    Client -> Server, send me all the details on <some reference>

    <- Server: dude, that was a bad reference - I almost crashed!

    Client: Well, server didn't like that, so I better tell the user that the server couldn't find his shit and that the request upset the server.


  4. Firstly, you need to know the nature of the exception.  Do you use EurekaLog or MadExcept? If not, you are blind to the actual cause of the exceptions.

    Do you know what your code is doing when it stops processing requests or why it stops?

     

    Once you know what goes wrong, add checks to avoid execution when you have invalid data.

     

    It may be useful to have a try/except block to set return values that indicate a failure, instead of exiting by exception, but it is rarely useful to have "catch all" blocks simply to silence exceptions.

     

    Secure each piece of code that runs in a thread and uses shared resources with try/finally so that any resource you allocate can be returned to the shared pool, and any locks you grab can be unlocked.

     

     

    • Like 1

  5. I don't think we need such a forum yet.  The AI would be external to Delphi even when an AI assist tool integrates in the IDE.
    The problems with incorrect AI generated code should be raised on the forums of the relevant AI producer.

     


  6. function InitializeSetup(): Boolean;
    begin
      Result := FileExists(ExpandConstant('C:\mygame\TEST\install.exe'))
             or FileExists(ExpandConstant('D:\mygame\TEST\install.exe'));
    end;

    Not sure what you mean by "assign 2 paths to this directive".


  7.  

    3 hours ago, bzwirs said:

    Sig[6].Name=Exception Code
    Sig[6].Value=0eedfade

    0EEDFADE indicates you had an exception in the Delphi code.

    Do you check all returned objects for assignment before use?
    Since you never see any UI, it is likely to happen in your initialization/startup code somewhere.

    I would recommend using EurekaLog or MadExcept for capturing the details of the exception.

×