Skip to content

create_function: impossible to call set_error #164

Closed
@lionelperrin

Description

@lionelperrin

FunctionProxy#set_error is implemented like this:

class FunctionProxy
      attr_accessor :result

      # Create a new FunctionProxy that encapsulates the given +func+ object.
      # If context is non-nil, the functions context will be set to that. If
      # it is non-nil, it must quack like a Hash. If it is nil, then none of
      # the context functions will be available.
      def initialize
        @result   = nil
        @context  = {}
      end

      # Set the result of the function to the given error message.
      # The function will then return that error.
      def set_error( error )
        @driver.result_error( @func, error.to_s, -1 )
      end
...

it looks that the instance variable @driver is never set, which causes the following error:
database.rb:559:inset_error': undefined method result_error' for nil:NilClass (NoMethodError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions