Fix SchemaEditor.__exit__ to handle exceptions correctly