[core] throw values, catch references

This commit is contained in:
Konstantin Käfer
2015-12-01 23:08:40 +01:00
parent 0c351eb523
commit c279fb1717
5 changed files with 12 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ void ThreadContext::setFileSource(FileSource* fileSource) {
if (current.get() != nullptr) {
current.get()->fileSource = fileSource;
} else {
throw new std::runtime_error("Current thread has no current ThreadContext.");
throw std::runtime_error("Current thread has no current ThreadContext.");
}
}
@@ -72,7 +72,7 @@ void ThreadContext::setGLObjectStore(GLObjectStore* glObjectStore) {
if (current.get() != nullptr) {
current.get()->glObjectStore = glObjectStore;
} else {
throw new std::runtime_error("Current thread has no current ThreadContext.");
throw std::runtime_error("Current thread has no current ThreadContext.");
}
}