Skip to content

Commit

Permalink
These should all be compile errors and not runtime errors as they occ…
Browse files Browse the repository at this point in the history
…ur during compiletime
  • Loading branch information
Toon Schoenmakers committed Mar 10, 2015
1 parent 33291c9 commit 3215ab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ccode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ void CCode::parameters(const Parameters *parameters)
_out << "callbacks->params_append_double(userdata,";
break;
default:
throw RunTimeError("Unknown typed values are currently unsupported");
throw CompileError("Unknown typed values are currently unsupported");
}
}

Expand Down Expand Up @@ -719,7 +719,7 @@ void CCode::parameters(const Parameters *parameters)
break;
default:
// should not be reachable as we probably already threw at this point
throw RunTimeError("Unknown typed values are currently unsupported");
throw CompileError("Unknown typed values are currently unsupported");
}
_out << ')';
}
Expand Down Expand Up @@ -817,7 +817,7 @@ void CCode::assign(const std::string &key, const Expression *expression)
variable->pointer(this);
break;
}
throw RunTimeError("Unsupported assign");
throw CompileError("Unsupported assign");
}
case Expression::Type::Double:
// Convert to a floating point value and use the assign_double callback
Expand Down

0 comments on commit 3215ab6

Please sign in to comment.