mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-01 09:02:18 +00:00
fix(userspace/falco): in case output_file cannot be opened, throw a falco exception.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
b5667cab99
commit
9dcd8bccac
@ -28,6 +28,10 @@ void falco::outputs::output_file::open_file()
|
|||||||
if(!m_outfile.is_open())
|
if(!m_outfile.is_open())
|
||||||
{
|
{
|
||||||
m_outfile.open(m_oc.options["filename"], fstream::app);
|
m_outfile.open(m_oc.options["filename"], fstream::app);
|
||||||
|
if (m_outfile.fail())
|
||||||
|
{
|
||||||
|
throw falco_exception("failed to open output file " + m_oc.options["filename"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user