Jojendersie / Monolith

A voxel based space simulation game
16 stars 1 forks source link

assert with generic error messages #52

Closed Wumpf closed 10 years ago

Wumpf commented 10 years ago

Currently we're using cassert for all assertions. This is sufficient for most cases and also allows simple error messages:

assert(someCondition && "Something went wrong");

However it is not possible to do something like this:

assert(someCondition, "OMFG that went wrong. By the way, blub was %i at this point", blub);

Would be nice to have and not that difficult :) What do you think and where could we put it?

Wumpf commented 10 years ago

Solved in 5aa381f523d1a0c8ec15048ddcec233aa9facfe8