C#C
C#4y ago
florent

Are exceptions really that slow? - with .NET gRPC

I am building a server base on gRPC. In all docs about gRPC + C# there is the suggested method for error handling to simply throw a RpcException to expose information to the client. But I always thought throwing an exception is extremely bad performance wise? I mean throwing an exception for a simple validation failure on the clients input data (REST eq: return BadRequest()) seems a bit too much, right? Or is that not really a big deal?
Was this page helpful?