     }
     
     mutating func encode(_ value: Int8) throws {
-        try wrapper.encode(value)
+        wrapper.encode(value)
     }
     
     mutating func encode(_ value: Int16) throws {
-        try wrapper.encode(value)
+        wrapper.encode(value)
     }
     
     mutating func encode(_ value: Int32) throws {

        }
    }
    
    init() {
        self.primitive = Document()
    }
    
    func encode<BI: BinaryInteger & SignedInteger>(_ value: BI) throws {
        if value.bitWidth > 32 {
            self.primitive = Int(value)
        } else {
            self.primitive = Int32(value)
        }
    }
    
    func encode<BI: BinaryInteger & UnsignedInteger>(_ value: BI) throws {
        if value.bitWidth >= 32 {
            self.primitive = Int(value)
        } else {
            self.primitive = Int32(value)
        }
    }
}

struct _BSONEncoder: Encoder {
    var codingPath: [CodingKey] = []
    var userInfo: [CodingUserInfoKey : Any] = [:]
    
    var wrapper = PrimitiveWrapper()
    
    init() {}
    
    func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key : CodingKey {
        <#code#>
    }
    
    func unkeyedContainer() -> UnkeyedEncodingContainer {

    }
    
    mutating func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type) -> KeyedEncodingContainer<NestedKey> where NestedKey : CodingKey {
        return KeyedEncodingContainer(BSONKeyedEncodingContainer<NestedKey>(encoder: self.wrapper.subEncoder))
    }
    
    mutating func nestedUnkeyedContainer() -> UnkeyedEncodingContainer {
        return BSONUnkeyedEncodingContainer(encoder: self.wrapper.subEncoder)
    }
    
    mutating func superEncoder() -> Encoder {
