Added error handler argument in CMS_STORAGE_BUILDER.storage (...) function.

Removed testing purpose code.
Update debug module.
This commit is contained in:
2015-07-10 12:20:28 +02:00
parent d24f124e42
commit 5477bab83c
8 changed files with 25 additions and 43 deletions

View File

@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
feature -- Factory
storage (a_setup: CMS_SETUP): detachable CMS_STORAGE_STORE_MYSQL
storage (a_setup: CMS_SETUP; a_error_handler: ERROR_HANDLER): detachable CMS_STORAGE_STORE_MYSQL
local
conn: DATABASE_CONNECTION
do
@@ -40,6 +40,8 @@ feature -- Factory
initialize (a_setup, Result)
end
end
else
a_error_handler.add_custom_error (0, "Could not connect to the MySQL storage", Void)
end
end
end

View File

@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
feature -- Factory
storage (a_setup: CMS_SETUP): detachable CMS_STORAGE_STORE_ODBC
storage (a_setup: CMS_SETUP; a_error_handler: ERROR_HANDLER): detachable CMS_STORAGE_STORE_ODBC
local
s: detachable STRING
conn: detachable DATABASE_CONNECTION
@@ -53,6 +53,8 @@ feature -- Factory
initialize (a_setup, Result)
end
end
else
a_error_handler.add_custom_error (0, "Could not connect to the ODBC storage", Void)
end
else
-- Wrong mapping between storage name and storage builder!