tarantool/tarantool

Add an analogue of panic, but using the last diagnostics area

Aperta

#4685 aperta il 15 dic 2019

 (0 commenti) (1 reazione) (0 assegnatari)Lua (406 fork)batch import
featuregood first issuerefactoring

Metriche repository

Star
 (3633 stelle)
Metriche merge PR
 (Merge medio 13g 2h) (82 PR mergiate in 30 g)

Descrizione

It is a common thing when code does something like this:

if (do_something(...)) {
        panic("Something failed, out of memory");
}

That is wrong in 2 ways: it is not always out of memory error, and the original error message is lost. We need something like diag_panic().

Guida contributor