Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3917

Display cleaner error in shell for invalid ObjectId - stack trace displayed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      This is a bit noisy. This should probably just show:

      Tue Sep 20 19:12:11 Error: 10448 invalid object id: length (shell):1

      PRIMARY> db.data.dbProfile.findOne(

      {cid: ObjectId("5277f6db23be91479fe6499b2d8808c5")}

      );
      Tue Sep 20 19:12:11 Assertion: 10448:invalid object id: length
      0x4a3942 0x4f2cc1 0x509844 0x5609dc 0x552455 0x56056f 0x51dc06 0x51dc82 0x51f08e 0x514a8f 0x4752c7 0x4762c6 0x3ae961ec1d 0x46edc9
      mongo(_ZN5mongo11msgassertedEiPKc+0x112) [0x4a3942]
      mongo() [0x4f2cc1]
      mongo(ZN5mongo21object_id_constructorEP9JSContextP8JSObjectjPlS4+0x94) [0x509844]
      mongo(js_Invoke+0x40c) [0x5609dc]
      mongo(js_Interpret+0x1305) [0x552455]
      mongo(js_Execute+0x36f) [0x56056f]
      mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x51dc06]
      mongo(JS_EvaluateUCScript+0x22) [0x51dc82]
      mongo(JS_EvaluateScript+0x6e) [0x51f08e]
      mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x11f) [0x514a8f]
      mongo(_Z5_mainiPPc+0x2957) [0x4752c7]
      mongo(main+0x26) [0x4762c6]
      /lib64/libc.so.6(__libc_start_main+0xfd) [0x3ae961ec1d]
      mongo(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x61) [0x46edc9]
      Tue Sep 20 19:12:11 Error: 10448 invalid object id: length (shell):1

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: