Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Minor public API improvements

  • Loading branch information...
commit 48f35b3c285a599abbd0563921ba676b16c475f9 1 parent f419c61
Yurii Rashkovskii yrashk authored

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 4 src/seresye.erl
9 src/seresye.erl
@@ -43,8 +43,9 @@ set_client_state(Name, NewState) ->
43 43 get_client_state(Name) ->
44 44 gen_server:call(Name, get_client_state).
45 45
46   -stop (EngineName) ->
47   - gen_server:call(EngineName, {stop}).
  46 +stop(EngineName) ->
  47 + (catch gen_server:call(EngineName, stop)),
  48 + ok.
48 49
49 50 get_engine(EngineName) ->
50 51 gen_server:call(EngineName, get_engine).
@@ -53,12 +54,12 @@ get_engine(EngineName) ->
53 54 %% It also checks if the fact verifies any condition,
54 55 %% if this is the case the fact is also inserted in the alpha-memory
55 56 assert(Name, Facts) ->
56   - gen_server:call(Name, {assert, Facts}).
  57 + gen_server:call(Name, {assert, Facts}, infinity).
57 58
58 59 %% @doc removes a 'fact' in the Knowledge Base and if something occurs
59 60 %% Condition is also deleted from the corresponding alpha-memory
60 61 retract(Name, Facts) ->
61   - gen_server:call(Name, {retract, Facts}).
  62 + gen_server:call(Name, {retract, Facts}, infinity).
62 63
63 64 add_rules(Name, RuleList)
64 65 when is_list(RuleList) orelse is_atom(RuleList) ->

0 comments on commit 48f35b3

Please sign in to comment.
Something went wrong with that request. Please try again.