Added error handler argument in CMS_STORAGE_BUILDER.storage (...) function.
Removed testing purpose code. Update debug module.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user