mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 09:26:52 +01:00
23 lines
553 B
AL
23 lines
553 B
AL
codeunit 50155 "Perf Sample TryFunc Good"
|
|
{
|
|
procedure ParseAndProcess(Payload: Text)
|
|
var
|
|
ParsedValue: Decimal;
|
|
begin
|
|
ClearLastError();
|
|
if not TryParseDecimal(Payload, ParsedValue) then begin
|
|
LogParseFailure(Payload, GetLastErrorText());
|
|
exit;
|
|
end;
|
|
end;
|
|
|
|
[TryFunction]
|
|
local procedure TryParseDecimal(Input: Text; var Result: Decimal)
|
|
begin
|
|
Evaluate(Result, Input);
|
|
end;
|
|
|
|
local procedure LogParseFailure(Payload: Text; Reason: Text)
|
|
begin
|
|
end;
|
|
}
|