From f835a83b8d05067522d65756161d7cf5034bb3c4 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 18 Sep 2002 11:36:58 -0400 Subject: better error reporting --- Source/cmLoadCommandCommand.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 7dec12c..94a0437 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -206,6 +206,11 @@ bool cmLoadCommandCommand::InitialPass(std::vector const& argsIn) // create a function blocker and set it up cmLoadedCommand *f = new cmLoadedCommand(); f->m_commandName = (*nameFunction)(); + if (!initFunction) + { + this->SetError("Attempt to load command failed. No init function found."); + return false; + } (*initFunction)(&f->info); m_Makefile->AddCommand(f); } -- cgit v0.12