summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-03-17 14:15:36 +0100
committerBart Visscher <bartv@thisnet.nl>2013-03-17 14:15:36 +0100
commite9213a67110d87c8127d0609859fe31726afbdbd (patch)
treec442086c5637952918115f3c4b8e4a0a91086c3d /lib
parent4a02dacf16b880e404994084584c59bc99bf6e0b (diff)
downloadnextcloud-server-e9213a67110d87c8127d0609859fe31726afbdbd.tar.gz
nextcloud-server-e9213a67110d87c8127d0609859fe31726afbdbd.zip
Change var_dumps to exceptions
Diffstat (limited to 'lib')
-rw-r--r--lib/db/mdb2schemareader.php19
-rw-r--r--lib/db/schema.php2
2 files changed, 7 insertions, 14 deletions
diff --git a/lib/db/mdb2schemareader.php b/lib/db/mdb2schemareader.php
index 05b9bd21289..6408c27e916 100644
--- a/lib/db/mdb2schemareader.php
+++ b/lib/db/mdb2schemareader.php
@@ -29,7 +29,7 @@ class OC_DB_MDB2SchemaReader {
self::loadTable($schema, $child);
break;
default:
- var_dump($child->getName());
+ throw new DomainException('Unknown element: '.$child->getName());
}
}
@@ -52,7 +52,7 @@ class OC_DB_MDB2SchemaReader {
self::loadDeclaration($table, $child);
break;
default:
- var_dump($child->getName());
+ throw new DomainException('Unknown element: '.$child->getName());
}
}
@@ -68,7 +68,7 @@ class OC_DB_MDB2SchemaReader {
self::loadIndex($table, $child);
break;
default:
- var_dump($child->getName());
+ throw new DomainException('Unknown element: '.$child->getName());
}
}
@@ -118,16 +118,11 @@ class OC_DB_MDB2SchemaReader {
$options['default'] = $default;
break;
default:
- var_dump($child->getName());
+ throw new DomainException('Unknown element: '.$child->getName());
}
}
if (isset($name) && isset($type)) {
- if ($name == 'x') {
- var_dump($name, $type, $options);
- echo '<pre>';
- debug_print_backtrace();
- }
if (empty($options['default'])) {
if ($type == 'integer') {
if (empty($options['default'])) {
@@ -187,13 +182,13 @@ class OC_DB_MDB2SchemaReader {
case 'sorting':
break;
default:
- var_dump($field->getName());
+ throw new DomainException('Unknown element: '.$field->getName());
}
}
break;
default:
- var_dump($child->getName());
+ throw new DomainException('Unknown element: '.$child->getName());
}
}
@@ -207,7 +202,7 @@ class OC_DB_MDB2SchemaReader {
$table->addIndex($fields, $name);
}
} else {
- var_dump($name, $fields);
+ throw new DomainException('Empty index definition: '.$name.' options:'. print_r($fields, true));
}
}
diff --git a/lib/db/schema.php b/lib/db/schema.php
index 231b8068af0..cd356e7ff83 100644
--- a/lib/db/schema.php
+++ b/lib/db/schema.php
@@ -76,8 +76,6 @@ class OC_DB_Schema {
$toSchema = clone $fromSchema;
$toSchema->dropTable('user');
$sql = $fromSchema->getMigrateToSql($toSchema, $conn->getDatabasePlatform());
- var_dump($sql);
- die;
$conn->execute($sql);
}