diff --git a/library/error/src/error_handler.e b/library/error/src/error_handler.e index 8ee91cdd..e6ff72fa 100644 --- a/library/error/src/error_handler.e +++ b/library/error/src/error_handler.e @@ -63,7 +63,7 @@ feature -- Events feature -- Synchronization - add_synchronized_handler (h: ERROR_HANDLER) + add_synchronization (h: ERROR_HANDLER) -- Add synchronization between `h' and `Current' --| the same handler can be added more than once --| it will be synchronized only once @@ -80,18 +80,18 @@ feature -- Synchronization check attached h.synchronized_handlers as h_lst and then h_lst.has (Current) end else lst.extend (h) - h.add_synchronized_handler (Current) + h.add_synchronization (Current) end end - remove_synchronized_handler (h: ERROR_HANDLER) + remove_synchronization (h: ERROR_HANDLER) -- Remove synchronization between `h' and `Current' do if attached synchronized_handlers as lst and then not lst.is_empty then synchronized_handlers := Void lst.prune_all (h) - h.remove_synchronized_handler (Current) + h.remove_synchronization (Current) synchronized_handlers := lst if lst.is_empty then @@ -294,7 +294,7 @@ feature -- Element changes across lst as c loop - c.item.remove_synchronized_handler (Current) + c.item.remove_synchronization (Current) end end synchronized_handlers := Void diff --git a/library/error/tests/test_error.e b/library/error/tests/test_error.e index b8bab0ff..af7fdec8 100644 --- a/library/error/tests/test_error.e +++ b/library/error/tests/test_error.e @@ -47,7 +47,7 @@ feature -- Test routines do create h1.make create h2.make - h1.add_synchronized_handler (h2) + h1.add_synchronization (h2) h1.add_custom_error (123, "abc", "abc error occurred") h1.add_custom_error (456, "abc", "abc error occurred") @@ -70,8 +70,8 @@ feature -- Test routines create h2.make create h3.make - h1.add_synchronized_handler (h2) - h2.add_synchronized_handler (h3) + h1.add_synchronization (h2) + h2.add_synchronization (h3) h1.add_custom_error (123, "abc", "abc error occurred") h1.add_custom_error (456, "abc", "abc error occurred") @@ -94,9 +94,9 @@ feature -- Test routines create h2.make create h3.make - h1.add_synchronized_handler (h2) - h2.add_synchronized_handler (h3) - h3.add_synchronized_handler (h1) + h1.add_synchronization (h2) + h2.add_synchronization (h3) + h3.add_synchronization (h1) h1.add_custom_error (123, "abc", "abc error occurred") h1.add_custom_error (456, "abc", "abc error occurred") @@ -119,17 +119,17 @@ feature -- Test routines create h2.make create h3.make - h1.add_synchronized_handler (h2) - h2.add_synchronized_handler (h3) - h3.add_synchronized_handler (h1) + h1.add_synchronization (h2) + h2.add_synchronization (h3) + h3.add_synchronization (h1) h1.add_custom_error (123, "abc", "abc error occurred") h1.add_custom_error (456, "def", "def error occurred") assert ("has 2 errors", h1.count = 2 and h2.count = h1.count and h3.count = h2.count) - h2.remove_synchronized_handler (h3) - h2.remove_synchronized_handler (h1) + h2.remove_synchronization (h3) + h2.remove_synchronization (h1) h1.add_custom_error (789, "ghi", "ghi error occurred") assert ("correct count of errors", h1.count = 3 and h2.count = 2 and h3.count = h1.count) @@ -149,9 +149,9 @@ feature -- Test routines create h2.make create h3.make - h1.add_synchronized_handler (h2) - h2.add_synchronized_handler (h3) - h3.add_synchronized_handler (h1) + h1.add_synchronization (h2) + h2.add_synchronization (h3) + h3.add_synchronization (h1) h1.add_custom_error (123, "abc", "abc error occurred") h1.add_custom_error (456, "def", "def error occurred")