How to change the default renpy exception screen

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
ddlcmoddev
Newbie
Posts: 1
Joined: Thu May 17, 2018 11:43 am
Contact:

How to change the default renpy exception screen

#1 Post by ddlcmoddev »

I would like to make a custom script for error handling that attempts to fix bugs by itself, and I want the default renpy exception screen to be replaced too.

How would I replace it? and how would I detect when an exception occurs?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to change the default renpy exception screen

#2 Post by Ocelot »

You edit RenPy source. This is the only way. Exception handling screen is not a part of the game and is not configurable. It intention is only to report an error and give traceback to aid in fixing the cause. It is not intended to be changed, because it is the last resort: if you see this screen, it means that your game have already failed error handling.

Even if you could replace global handler, it would not do you any good: when execution is handed to exception handler, game is already dead. Game loop is broken from, game context is destroyed. Only thing you can do is to load game or restart it.

If you want to to handle errors, do it inside your game: wrap parts of script you know how to fix in try/exception blocks, for example.
< < insert Rick Cook quote here > >

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: How to change the default renpy exception screen

#3 Post by PyTom »

Correct. This is is not a part of Ren'Py I support changing.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
badanni
Newbie
Posts: 9
Joined: Fri Jan 24, 2020 11:57 am
itch: badanni
Location: Quito, Ecuador
Contact:

Re: How to change the default renpy exception screen

#4 Post by badanni »

override the screen _exception or loading again an custom _errorhandling.rpym (only with screen _exception)

Code: Select all

renpy.exports.load_module("core/_errorhandling")

Post Reply

Who is online

Users browsing this forum: AWizardWithWords, Ocelot