mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove obscure DEV_IGNORE_EXCEPTIONS macro
This commit is contained in:
parent
becea47ac3
commit
a3bd670154
@ -76,8 +76,6 @@ using byte = uint8_t;
|
||||
#define DEV_QUOTED_HELPER(s) #s
|
||||
#define DEV_QUOTED(s) DEV_QUOTED_HELPER(s)
|
||||
|
||||
#define DEV_IGNORE_EXCEPTIONS(X) try { X; } catch (...) {}
|
||||
|
||||
namespace dev
|
||||
{
|
||||
|
||||
|
@ -78,12 +78,24 @@ void dev::writeFile(std::string const& _file, bytesConstRef _data, bool _writeDe
|
||||
if (!fs::exists(p.parent_path()))
|
||||
{
|
||||
fs::create_directories(p.parent_path());
|
||||
DEV_IGNORE_EXCEPTIONS(fs::permissions(p.parent_path(), fs::owner_all));
|
||||
try
|
||||
{
|
||||
fs::permissions(p.parent_path(), fs::owner_all);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ofstream s(_file, ios::trunc | ios::binary);
|
||||
s.write(reinterpret_cast<char const*>(_data.data()), _data.size());
|
||||
assertThrow(s, FileError, "Could not write to file: " + _file);
|
||||
DEV_IGNORE_EXCEPTIONS(fs::permissions(_file, fs::owner_read|fs::owner_write));
|
||||
try
|
||||
{
|
||||
fs::permissions(_file, fs::owner_read|fs::owner_write);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user