GDScript does not have built-in support for try-catch blocks. There are many godot-proposals from people asking for it, however, It has already been stated that try-catch will never come into gdscript.
The assert statement is used to check if a condition is true, and if not, raise an error:
assert
assert(x > 0, "x must be positive")