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

CommandEvent publisher catches all exceptions

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • 4.9.0
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: