Throw an exception when instead of calling exit when the "--newlinesoff" argument is used with incompatible targets
This commit is contained in:
parent
aac3085e94
commit
7b1987f81b
@ -128,8 +128,8 @@ shared_ptr<Target> Target::forName(string_view name, const bool newLines = true)
|
||||
}
|
||||
#undef ADDTARGET
|
||||
if (not newLines and not target->supportsOneLine()) {
|
||||
cout << "--newlinesoff cannot be used with --target=" << name.substr(1) << endl;
|
||||
exit(0);
|
||||
name.remove_prefix(1);
|
||||
throw Yerbacon::Exception(string("--newlinesoff cannot be used with --target=") += name);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user