I am done with .NET and it's bullshit error messages.

"Validation error happened! Please see Entity.Validation.Properties to see what the error is, then consult an oracle, who'll summon a demon who'll answer only three questions . . ."

FUCK OFF and just give me the error. I swear to god exceptions in NET always lead to some stupid fucking scavenger hunt rather than just letting me know what the fuck went wrong. This isn't the first time I've encountered this either, where it tells me there's an error and there's a mountain with a shaman at the top who'll provide me with the details if I can just hire a sherpa who'll help me climb it.

  • 3
    How is that not helpful? If you have done logging properly and know how to place a few breakpoints in your code you'll actually be able to see what the Entity Framework validation error was.
    But I'll make a guess to how you have done your logging: > log.Write(exception.Message);
  • 0
    @MRCSharp I’m 100% ignorant of C# / .NET programming. Why is the above bad practice?
  • 4
    @Diactoros Exceptions in .Net are actually regular objects so they have properties. Printing out only the message property is not enough sometimes because the dev who created that exception object might not have put all the info in the message property. That's why it is recommended to use a structured logging library because you can pass the exception object and have all of its properties included with the log message.
Add Comment