Skip to content

Commit

Permalink
throw except
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour committed Dec 17, 2024
1 parent 63bf5b2 commit 7995006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/script/sscsm_environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class SSCSMEnvironment : public Thread
{
}

void runEventOnStep();

std::unique_ptr<ISSCSMEvent> cmdPollNextEvent();
MapNode cmdGetNode(v3s16 pos);
};
3 changes: 2 additions & 1 deletion src/script/sscsm_irequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#pragma once

#include "exceptions.h"
#include <memory>
#include <type_traits>

Expand Down Expand Up @@ -45,7 +46,7 @@ inline T deserializeSSCSMAnswer(SerializedSSCSMAnswer answer_serialized)
// dynamic cast in place of actual deserialization
auto ptr = dynamic_cast<T *>(answer_serialized.get());
if (!ptr) {
throw 0; //TODO: serialization excpetion
throw SerializationError("deserializeSSCSMAnswer failed");
}
return std::move(*ptr);
}
Expand Down

0 comments on commit 7995006

Please sign in to comment.