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 » Thu May 17, 2018 11:46 am

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
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: How to change the default renpy exception screen

#2 Post by Ocelot » Thu May 17, 2018 1:37 pm

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: 15443
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 » Sat May 19, 2018 12:25 pm

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
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot]