Error during Compilation

Sometimes, after I have made changes to my WebCore project I get the error:

Error during compilation
[Fatal Error] Error during compilation

With no further information. If I roll back to the previous working version and then re-add the changes it usually works. This is time consuming. Is there a way to see what causes this problem.

a little messing abount (removing the last form from the project list, but it still gets built) gives the error

[Error] RegisterAgreement.pas(46): await only available in async procedure

yet the definition is

    procedure LoadAgreement;

And JS is in the uses clause.

It is interesting that when the form is specifically included in the project I only get the error message, but when it's not I get the reason.

That is strange. Can you isolate this and send a test project with which we can reproduce the problem here?

Demo project attached.

Build it without the RegisterAgreement specifically linked into the project and you get the async error. Link it in and build, and then you just get an error message. (53.2 KB)

I see two things wrong with your code/project:

  1. You need to add the form RegisterAgreement to your project
  2. You declare WebClient as
    property WebClient: TXDataWebClient write FWebClient;

but then you use it while there is no read access defined in

lRetval := await(TXDataClientResponse, WebClient.RawInvokeAsync(Svc_LookUpCharityDetails, []));

Change it to

lRetval := await(TXDataClientResponse, FWebClient.RawInvokeAsync(Svc_LookUpCharityDetails, []));

for example

Hi Bruno,

  1. If read my post you will see that adding the form to the project gives you the just compilation error


and leaving it out gives you the async error as well as the compilation error


  1. Yes this is the actual error, but it is not reported as such - just the async error.

I did read your post and I did open your project and I did fix the issues in your code.

  • 1) needs to be fixed regardless of 2)

  • 2) is a pas2js transpiler shortcoming but the problem in your code remains and I suggested how to fix it.
    The async error is because of 1)

Yes, I'd fixed the error but was just showing that you get less of an error explanation when the form is included in the app, rather than when it wasn't. Although it is not the correct error reported (can't read from a write only property) at least it gives you the location of where the error is occurring.