Skip to content

Commit 17f761d

Browse files
committed
Fix FormatException
1 parent 9f64898 commit 17f761d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ElectronNET.API/API/ApiBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ public Invocator(ApiBase apiBase, string callerName, TimeSpan timeout, object ar
314314
{
315315
if (this.tcs != null)
316316
{
317-
var ex = new TimeoutException($"No response after {timeout:D}ms trying to retrieve value {apiBase.objectName}.{callerName}()");
317+
var ex = new TimeoutException(
318+
$"No response after {(long)timeout.TotalMilliseconds}ms trying to retrieve value {apiBase.objectName}.{callerName}()"
319+
);
318320
this.tcs.TrySetException(ex);
319321
this.tcs = null;
320322
}

0 commit comments

Comments
 (0)