From d5b0c6b3fbdbd531cffdbb7404a14948757fad3c Mon Sep 17 00:00:00 2001 From: Josh Gunter <59844337+jagunter@users.noreply.github.com> Date: Mon, 3 Apr 2023 19:33:19 -0700 Subject: [PATCH] Use throw in C++ decompiler code --- Ghidra/Features/Decompiler/src/decompile/cpp/type.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc index b35dcc3397..4ae59ec98a 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc @@ -1907,7 +1907,7 @@ TypePartialStruct::TypePartialStruct(Datatype *contain,int4 off,int4 sz,Datatype { #ifdef CPUI_DEBUG if (contain->getMetatype() != TYPE_STRUCT && contain->getMetatype() != TYPE_ARRAY) - throw new LowlevelError("Parent of partial struct is not a struture or array"); + throw LowlevelError("Parent of partial struct is not a struture or array"); #endif flags |= has_stripped; stripped = strip; @@ -2119,7 +2119,7 @@ void TypePointerRel::decode(Decoder &decoder,TypeFactory &typegrp) offset = decoder.readSignedInteger(ATTRIB_CONTENT); decoder.closeElement(subId); if (offset == 0) - throw new LowlevelError("For metatype=\"ptrstruct\", tag must not be zero"); + throw LowlevelError("For metatype=\"ptrstruct\", tag must not be zero"); submeta = SUB_PTRREL; if (name.size() == 0) // If the data-type is not named markEphemeral(typegrp); // it is considered ephemeral