[Ohrrpgce] SVN: teeemcee/10727 Add debugerror, showbug, fatalbug functions and rearrange ErrorLevelEnum

Ralph Versteegen teeemcee at gmail.com
Mon Oct 1 05:46:49 PDT 2018

I think I made that warning icon way too big...
Also maybe showerror itself should give you a few options like "Temporarily
ignore errors" and "View error log"

I've noticed today that when a script fails to import (corrupted .hs file)
or there's a problem distributing a game, you can get spammed with 7 error
messages in a row, most of them useless or misleading (and also often the
initial error either wasn't detected, or wasn't usefully reported), and
that's really not fun. So logging the errors and then telling the user to
review them afterwards allays such cases of poor error handling too.

On Mon, 1 Oct 2018 at 02:14, Ralph Versteegen <teeemcee at gmail.com> wrote:

> Viewing errors generated in-game in Custom? That's another idea. Of course
> it would pretty important for script errors but I don't see why viewing
> them in Game wouldn't be sufficient.
> Anyway, mockup
> [image: errormockup.png]
> On Mon, 1 Oct 2018 at 01:20, James Paige <Bob at hamsterrepublic.com> wrote:
>> I really like the idea of making the error log viewable in the F9 menu.
>> It could also just show the section of g_debug relevant to the current (or
>> most recent) run of Test Game
>> On Sunday, September 30, 2018, Ralph Versteegen <teeemcee at gmail.com>
>> wrote:
>>> (Part 1: just talking to myself)
>>> Our error reporting is quite a mess, and I certainly made it far messier
>>> when I added different error levels.
>>> This commit is just an exercise in hill-climbing: making a small
>>> improvement without thinking about the global optimum: whether the whole
>>> thing should actually be replaced.
>>> I'm pretty sick of telling people to look in g/c_debug.txt when they
>>> have a problem - it's not just for us; those error messages are often
>>> useful for people too.
>>> We usually just call debug to log an error. There are about 750 calls to
>>> debug which aren't commented out. Some are just debug noise, some are
>>> errors, some indicate corrupt data, some are engine bugs, some are fatal
>>> errors.
>>> I hope that by adding (in particular) showbug and debugerror that these
>>> will get used more instead of debug.
>>> I guess we don't want to pop up error messages unnecessarily while
>>> you're playing a game, just like we don't want to show script errors, if
>>> there's a possibility that the error can just be ignored.
>>> I also don't like how showerror prompts the user to quit the program
>>> (once 3 errors have occurred), because you don't want to do that while
>>> editing a game unless you're really stuck.
>>> (Part 2: some ideas)
>>> So maybe a certain severity of error (I guess that's debugerror; debug
>>> is used too much) should be logged if it happens in-game, but pops up a
>>> message if it happens while editing (or in Test Game)?
>>> But then there's a still a risk of it turning into spamming.
>>> So, instead, maybe what we should do is that when debugerror is called,
>>> we display a warning icon in the corner of the screen for a few seconds
>>> with some text like "F9 to see error", and in Custom's F9 menu is an option
>>> "See error log" (probably excluding debuginfo).
>>> Such an option in the F9 menu would be great either way.
>>> The warning icon could be shown in-game too, because a lot of errors
>>> indicate data that couldn't be loaded and you'd likely want to know that as
>>> a player. If it just displays for a few seconds it doesn't interrupt the
>>> game a fraction as badly as calling showerror.
>>> Also, I'd like to use CrashRpt to report whenever a bug is detected. Can
>>> send a minidump/stacktrace. We can do that on Linux/Mac too, just need
>>> extra code to upload to the server.
>>> On Mon, 1 Oct 2018 at 00:39, <subversion at hamsterrepublic.com> wrote:
>>>> teeemcee
>>>> 2018-09-30 04:39:04 -0700 (Sun, 30 Sep 2018)
>>>> 543
>>>> Add debugerror, showbug, fatalbug functions and rearrange
>>>> ErrorLevelEnum levels
>>>> There are now aliases for most debugc error levels:
>>>>  debuginfo
>>>>  debug
>>>>  visible_debug
>>>>  debugerror
>>>>  showerror
>>>>  showbug
>>>>  fatalerror
>>>>  fatalbug
>>>> So I will mostly stop using debugc.
>>>> Got rid of errShowError, renamed errShow to errShowError and errFatal to
>>>> errFatalError, added errShowInfo and errShowDebug (the latter is
>>>> visible_debug). Simplified visible_debug and dist_info.
>>>> Also, forgot to update errorlevel.h and C/C++ code after renaming
>>>> ErrorLevelEnum
>>>> constants.
>>>> ---
>>>> U   wip/allmodex.bas
>>>> U   wip/array.c
>>>> U   wip/common.rbas
>>>> U   wip/common_base.bas
>>>> U   wip/common_base.bi
>>>> U   wip/const.bi
>>>> U   wip/distribmenu.bas
>>>> U   wip/errorlevel.h
>>>> U   wip/filelayer.cpp
>>>> U   wip/gfx_sdl2.bas
>>>> U   wip/misc.h
>>>> U   wip/surface.cpp
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20181002/6610c77c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errormockup.png
Type: image/png
Size: 10090 bytes
Desc: not available
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20181002/6610c77c/attachment-0001.png>

More information about the Ohrrpgce mailing list