Skip to content
Snippets Groups Projects
Commit ec7d4879 authored by alangrafu's avatar alangrafu
Browse files

Reporting which component specifically is missing in special

Fixing https://github.com/alangrafu/lodspeakr/issues/28
parent 967c14ce
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,13 @@ class SpecialFunction extends AbstractSpecialFunction{
try{
$viewFile = $conf['special']['uri'].".".$f.$conf['view']['extension'].".".$extension;
$modelFile = $conf['special']['uri'].".".$f.$conf['model']['extension'].".".$extension;
if(!(is_dir($conf['model']['directory'].$modelFile) || is_file($conf['model']['directory'].$modelFile)) || !is_file($conf['view']['directory'].$viewFile)){
throw new Exception('<h1>Method does not exist!</h1><br/>This means that <tt>'.$conf['model']['directory'].$modelFile.'</tt> or <tt>'.$conf['view']['directory'].$viewFile."</tt> (or both) don't exist.<br/>Please refer to this tutorial to create one.<br/>");
if(!(is_dir($conf['model']['directory'].$modelFile) || is_file($conf['model']['directory'].$modelFile))){
$msg = '<h1>Method does not exist!</h1><br/>This means that <tt>'.$conf['model']['directory'].$modelFile."</tt> doesn't exist.<br/>Please refer to this tutorial to create one.<br/>";
throw new Exception($msg);
}
if(!is_file($conf['view']['directory'].$viewFile)){
$msg='<h1>Method does not exist!</h1><br/>This means that <tt>'.$conf['view']['directory'].$viewFile."</tt> doesn't exist.<br/>Please refer to this tutorial to create one.<br/>";
throw new Exception($msg);
}
$endpoints = $context['endpoints'];
array_pop($params);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment