Skip to content

Commit

Permalink
added proper errors message if kernel has no features
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 7, 2012
1 parent 564295a commit aa97093
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shogun/kernel/Kernel.cpp
Expand Up @@ -102,8 +102,11 @@ bool CKernel::init(CFeatures* l, CFeatures* r)
SG_REF(r);

//make sure features were indeed supplied
ASSERT(l);
ASSERT(r);
if (!l)
SG_ERROR("%s::init(): Features on left side are NULL\n", get_name());

if (!r)
SG_ERROR("%s::init(): Features on right side are NULL\n", get_name());

//make sure features are compatible
ASSERT(l->get_feature_class()==r->get_feature_class());
Expand Down

0 comments on commit aa97093

Please sign in to comment.