Aborts the program with a message

v is used to know if a colored message is displayed or not

Property definitions

nitc :: naive_interpreter $ ANode :: fatal
	# Aborts the program with a message
	# `v` is used to know if a colored message is displayed or not
	fun fatal(v: NaiveInterpreter, message: String)
	do
		# Abort if there is a `catch` block
		if v.catch_count > 0 then
			v.last_error = new FatalError(message, self)
			abort
		end

		if v.modelbuilder.toolcontext.opt_no_color.value then
			sys.stderr.write("Runtime error: {message} ({location.file.filename}:{location.line_start})\n")
		else
			sys.stderr.write("{location}: Runtime error: {message}\n{location.colored_line("0;31")}\n")
			sys.stderr.write(v.stack_trace)
			sys.stderr.write("\n")
		end
		exit(1)
	end
src/interpreter/naive_interpreter.nit:868,2--886,4