From d9f702bca897b9fdbfcde5b9f39127c8ab680767 Mon Sep 17 00:00:00 2001 From: alvaro <alvaro@alia.(none)> Date: Mon, 5 Mar 2012 10:06:29 -0800 Subject: [PATCH] Show path of query file on debug mode --- classes/Utils.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/Utils.php b/classes/Utils.php index 95baf1c3..809c9963 100644 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -234,8 +234,14 @@ class Utils{ case 'rdf': $ser = ARC2::getRDFXMLSerializer(); break; + default: + $ser = null; } + if($ser != null){ $doc = $ser->getSerializedTriples($triples); + }else{ + $doc = var_export($data, true); + } return $doc; } @@ -435,7 +441,8 @@ class Utils{ } } if($conf['debug']){ - echo "$modelFile (against ".$e->getSparqlUrl().")\n-------------------------------------------------\n"; + echo "\n-------------------------------------------------\nIn ".getcwd()."\n"; + echo "$modelFile (against ".$e->getSparqlUrl().")\n-------------------------------------------------\n\n"; echo $query; } trigger_error("Running query from ".$modelFile." on endpoint ".$e->getSparqlURL(), E_USER_NOTICE); -- GitLab