When multiple, adjacent ``++MONITOR++`` statements have duplicate ``++ON-ERROR++`` blocks, they should be merged to consolidate the ``++ON-ERROR++`` logic for cleaner, more readable code. Note that this applies even when there is intervening code outside any ``++MONITOR++`` block.

== Noncompliant Code Example

----
 /free
   monitor; 
      // do something...
   on-error;
      CALLP HandleError(*param);
   endmon;

   // do un-monitored thing

   monitor;
      // do something else...
   on-error;  // Noncompliant
      CALLP HandleError(*param);
   endmon;
 /end-free
----

== Compliant Solution

----
 /free
   monitor; 
      // do something...
      // do un-monitored thing
      // do something else...
   on-error;
      CALLP HandleError(*param);
   endmon;
----

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
