Skip to content

Commit 7902e1d

Browse files
committed
Reveal original non-success error
1 parent ed99506 commit 7902e1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/EvaluateCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public RemoteValue AsSuccessResult()
4949
return success.Result;
5050
}
5151

52-
throw new BiDiException(ToString());
52+
throw new InvalidCastException($"Expected the result to be {nameof(EvaluateResultSuccess)}, but received {this}");
5353
}
5454
}
5555

0 commit comments

Comments
 (0)