I'm making some kind of utility script that can use with any godot project. In the script, it requires some parameters, so I want to stop the game and warn the developer if the value is empty.

Nothing related found in documenation. In Unity, when script throw exception, game stopped and display the error detail(only in Unity editor play mode). How to throw exception or error from GDScript? Using Godot 3.1.1

You can print an error using the printerr function, or at least I think that is what the function’s name is. Unfortunately, as far as I know there is no way to throw or raise an exception in Godot. I think you can throw/raise exceptions in C# with Godot, but I do not think GDScript has this capability.

You'll want to use push_error() for this, as will give you a stack trace and will be visible in the editor's Errors tab. If you want to interrupt the project's execution, you can call assert(false) afterwards (only effective in debug builds). To quit the project entirely, use get_tree().quit().

There's also push_warning(), which will print a warning message.

3 years later