![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Thu, Jul 19 2018 7:30 AM | Permanent Link |
Matthew Jones | I have an odd one here. Sure this has worked before.
try StrToInt(''); except on errInfo : Exception do begin lblError.Visible := true; lblError.Caption := errInfo.Message; end; end; The label is actually already visible, but StrToInt throws a string message as the exception. errInfo.Message is undefined, because errInfo is the error string itself. The help shows: try // Statements that raise exception except on E: Exception do LogOutput(E.Message); raise; end; So why is Chrome blowing up on this call to set the caption? Hmm, the code in strtobool has throw new Error(webcore_translate1("ERR_BOOLEAN_LITERAL", [value])); But strtoint has throw "Invalid integer value"; (And strtodouble has similar) That code seems to be an intrinsic, so I can't see the source. Bug? -- Matthew Jones |
Thu, Jul 19 2018 9:09 AM | Permanent Link |
Michael Dreher | "Matthew Jones" wrote:
// But strtoint has // throw "Invalid integer value"; That's not new. I've looked in some compiled code from 2016-12, and there StrToInt already throws a string literal. So on JS level "errInfo" is of type string? I tried... try StrToInt(''); except on errInfo : Exception do begin lblError.Visible := true; lblError.Caption := string(variant(errInfo)); end; end; and it seem to work (for this one). M. Dreher |
Thu, Jul 19 2018 12:15 PM | Permanent Link |
Matthew Jones | Michael Dreher wrote:
> lblError.Caption := string(variant(errInfo)); Ahah, well done on getting it to work. I just got compiler errors with what I tried. But obviously is a long standing bug. -- Matthew Jones |
Mon, Jul 23 2018 12:36 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< The label is actually already visible, but StrToInt throws a string message as the exception. errInfo.Message is undefined, because errInfo is the error string itself. >> I'll have a fix for this in the next build (unfortunately, I released a new build this morning before I read this). Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, March 23, 2023 at 02:07 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |