Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

DragonRuby Game Toolkit

An intuitive 2D game engine. Fast, cross-platform, tiny, hot loaded. · By DragonRuby

This really needs proper debugging and error handling

A topic by kettek created Jun 21, 2019 Views: 286 Replies: 5
Viewing posts 1 to 4

This is quite heavily due to my unfamiliarity with ruby, but the lack of helpful error messages is killing me. Using an incorrect operator or bogus if check should not result in errors like "stack level too deep" or the even worse nil thrashing error that tells me absolutely nothing about where it is coming from.

I am very much doubtful of the "(yet professional grade)" statement on the tool's page, as it feels a far throw from that. Professional grade does not leave you feeling SOL when a simple syntax error occurs.


indeed it does, the errors i receive dont'  make any sense even simple syntax errors aren't handled properly


I am pretty familiar with Ruby, as I use it all day every day in my day job for about 5 years or so, and I really struggle with the debugging on this. I make all of my classes inherit from a DragonClass, which handles `method_missing`, so I can at least catch stupid typos. It's not much, but it helps a tiny bit


# frozen_string_literal: true

class DragonClass
  def method_missing(method, *_args, &_block)
    printf("You called #{method}, which doesn't exist. Exploding.\n")

  def respond_to_missing?(method_name, include_private = false)

Thanks a lot for this. I'll give it a try with my current project so I'll at least have something to catch my user errors.


The error support in the next release is significantly better. More needs to be done, but this next updated will (hopefully) make the stack errors go away.

Great, glad to hear it!