Is a ValueError a Runtime Error? Understanding Python Exception Types

18 Replies, 1898 Views

Hey folks,
so I was debugging some code earlier and ran into a ValueError. Got me thinking... is a ValueError a runtime error? Like, I know it happens when the code is running, but is it *officially* a runtime error?

I’ve heard people say all exceptions are runtime errors, but idk, feels like there’s some nuance here. Like, is it more about when it happens or what causes it?

Also, does it even matter? I mean, as long as I catch it and fix it, who cares, right? But still, curiosity got the better of me lol.

Anyone got a clear answer or just wanna share their thoughts?

Cheers!

Messages In This Thread
Is a ValueError a Runtime Error? Understanding Python Exception Types - by - 15-02-2025, 06:03 AM



Users browsing this thread: 1 Guest(s)