mirror of
https://github.com/holub/mame
synced 2025-06-01 02:21:48 +03:00
report line number when an exception occurs (#11564)
This commit is contained in:
parent
19aa303afa
commit
4654a36abc
@ -8,6 +8,7 @@
|
||||
|
||||
#include "nl_convert.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@ -332,8 +333,20 @@ double nl_convert_base_t::get_sp_val(const pstring &sin) const
|
||||
|
||||
void nl_convert_spice_t::convert_block(const str_list &contents)
|
||||
{
|
||||
int linenumber = 0;
|
||||
for (const auto &line : contents)
|
||||
process_line(line);
|
||||
{
|
||||
try
|
||||
{
|
||||
process_line(line);
|
||||
}
|
||||
catch (plib::pexception &e)
|
||||
{
|
||||
fprintf(stderr, "Error on line: <%d>\n", linenumber);
|
||||
throw(e);
|
||||
}
|
||||
linenumber++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user