5.3 always throw on error

This commit is contained in:
Manuel Araoz
2017-03-20 17:01:18 -03:00
parent a1aa74f96d
commit 52120a8c42
5 changed files with 32 additions and 34 deletions

View File

@ -13,15 +13,17 @@ contract Pausable is Ownable {
bool public stopped;
modifier stopInEmergency {
if (!stopped) {
_;
if (stopped) {
throw;
}
_;
}
modifier onlyInEmergency {
if (stopped) {
_;
if (!stopped) {
throw;
}
_;
}
// called by the owner on emergency, triggers stopped state