Skip to content

Commit

Permalink
AURORA: Catch by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
logzero authored and DrMcCoy committed Mar 19, 2013
1 parent 4dee958 commit 01e1777
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/aurora/nwscript/ncsfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void NCSFile::executeStep() {

try {
(this->*(_opcodes[opcode].proc))(type);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}

Expand Down Expand Up @@ -583,7 +583,7 @@ void NCSFile::o_logand(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg1 && arg2);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -596,7 +596,7 @@ void NCSFile::o_logor(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg1 || arg2);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -609,7 +609,7 @@ void NCSFile::o_incor(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg1 | arg2);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -622,7 +622,7 @@ void NCSFile::o_excor(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg1 ^ arg2);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -635,7 +635,7 @@ void NCSFile::o_booland(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg1 && arg2);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand Down Expand Up @@ -667,7 +667,7 @@ void NCSFile::o_geq(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 >= arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -677,7 +677,7 @@ void NCSFile::o_geq(InstructionType type) {
float arg1 = _stack.pop().getFloat();
float arg2 = _stack.pop().getFloat();
_stack.push(arg2 >= arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -694,7 +694,7 @@ void NCSFile::o_gt(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 > arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -704,7 +704,7 @@ void NCSFile::o_gt(InstructionType type) {
float arg1 = _stack.pop().getFloat();
float arg2 = _stack.pop().getFloat();
_stack.push(arg2 > arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -721,7 +721,7 @@ void NCSFile::o_lt(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 < arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -731,7 +731,7 @@ void NCSFile::o_lt(InstructionType type) {
float arg1 = _stack.pop().getFloat();
float arg2 = _stack.pop().getFloat();
_stack.push(arg2 < arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -748,7 +748,7 @@ void NCSFile::o_leq(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 <= arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -758,7 +758,7 @@ void NCSFile::o_leq(InstructionType type) {
float arg1 = _stack.pop().getFloat();
float arg2 = _stack.pop().getFloat();
_stack.push(arg2 <= arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -776,7 +776,7 @@ void NCSFile::o_shleft(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 << arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -789,7 +789,7 @@ void NCSFile::o_shright(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 >> arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -804,7 +804,7 @@ void NCSFile::o_ushright(InstructionType type) {
int32 arg1 = _stack.pop().getInt();
int32 arg2 = _stack.pop().getInt();
_stack.push(arg2 >> arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -823,7 +823,7 @@ void NCSFile::o_mod(InstructionType type) {
throw Common::Exception("NCSFile::o_mod(): Modulus by negative number (%d %% %d)", arg2, arg1);

_stack.push(arg2 % arg1);
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand All @@ -833,15 +833,15 @@ void NCSFile::o_neg(InstructionType type) {
case kInstTypeInt:
try {
_stack.push(-_stack.pop().getInt());
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;

case kInstTypeFloat:
try {
_stack.push(-_stack.pop().getFloat());
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
break;
Expand All @@ -857,7 +857,7 @@ void NCSFile::o_comp(InstructionType type) {

try {
_stack.push(~_stack.pop().getInt());
} catch (Common::Exception e) {
} catch (Common::Exception &e) {
throw e;
}
}
Expand Down

0 comments on commit 01e1777

Please sign in to comment.