Skip to content

Commit

Permalink
Merge pull request #144 from krkeegan/insteon_warn_no_root
Browse files Browse the repository at this point in the history
Insteon: Add Error Message if Root Object Cannot be Found
  • Loading branch information
krkeegan committed Mar 26, 2013
2 parents 907d176 + b6af5bb commit cc50de5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Insteon/BaseInsteon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,12 @@ sub get_root {
}
else
{
return &Insteon::get_object($self->device_id, '01');
my $root_obj = &Insteon::get_object($self->device_id, '01');
::print_log ("[Insteon::BaseDevice] ERROR! Cannot find the root object for "
. $self->get_object_name ". Please check your mht file to make sure "
"that device id " . $self->device_id . ":01 is defined.")
if (!defined($root_obj));
return $root_obj;
}
}

Expand Down

0 comments on commit cc50de5

Please sign in to comment.