Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5249

CommandEvent publisher catches all exceptions

    • Type: Icon: Question Question
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.9.0
    • None

      When I used "CommandListener", I encountered the problem of exception being caught. My scenario is that if no condition (Filter) is specified when modifying or deleting, an exception will be thrown, which is considered a dangerous operation, but in the end I threw The exception was caught by the sendCommandStartedEvent method of the ProtocolHelper class. After the capture, it was not thrown again, causing my program to continue executing and all collection data to be deleted. Is there any way to bypass the capture, or is there anything else? The method allows me to obtain it before the statement is executed, such as the interceptor in MyBatis

            Assignee:
            slav.babanin@mongodb.com Slav Babanin
            Reporter:
            j15030047216@163.com chaoyang jia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: