Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
de7724e6
Commit
de7724e6
authored
Nov 04, 2019
by
SOLIMAN Sylvain
Browse files
BUGFIX error messages should not contain ~
parent
cbb987b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
influence_editor.pl
View file @
de7724e6
...
...
@@ -174,7 +174,7 @@ list_model_influences :-
).
prolog
:
error_
message
(
not_an_influence_model
)
-->
prolog
:
message
(
error
(
not_an_influence_model
)
)
-->
[
'Not an influence model'
].
...
...
models.pl
View file @
de7724e6
...
...
@@ -635,34 +635,20 @@ inherits(Id, AncestorId) :-
).
prolog
:
error_message
(
cannot_inherit_from_itself
)
-->
[
'Cannot inherit from itself.'
].
prolog
:
message
(
error
(
cannot_inherit_from_itself
))
-->
[
'Cannot inherit from itself.'
].
prolog
:
error_message
(
already_inherits
)
-->
[
'There is already such an inheritance relation.'
].
prolog
:
message
(
error
(
already_inherits
))
-->
[
'There is already such an inheritance relation.'
].
prolog
:
error_message
(
cannot_inherit_from_descendant
)
-->
[
'Cannot inherit from descendant.'
].
prolog
:
error_message
(
kind_mismatch
(
Ident
,
Kind
,
NeededKind
)
)
-->
{
format
(
atom
(
Message
),
'There is a mismatch between the uses of ~a: ~a and ~a.'
,
[
Ident
,
Kind
,
NeededKind
]
)
},
[
Message
].
prolog
:
message
(
error
(
cannot_inherit_from_descendant
))
-->
[
'Cannot inherit from descendant.'
].
prolog
:
message
(
error
(
kind_mismatch
(
Ident
,
Kind
,
NeededKind
)))
-->
[
'There is a mismatch between the uses of ~a: ~a and ~a.'
-
[
Ident
,
Kind
,
NeededKind
]].
inherits_from
(
Id
,
AncestorId
)
:-
...
...
namespace.pl
View file @
de7724e6
...
...
@@ -50,17 +50,10 @@ check_identifier_kind(Ident, NeededKind) :-
).
prolog
:
error_
message
(
already_defined_with_another_kind
(
Ident
,
Kind
,
NeededKind
)
prolog
:
message
(
error
(
already_defined_with_another_kind
(
Ident
,
Kind
,
NeededKind
)
)
)
-->
{
format
(
atom
(
Message
),
'~a cannot be ~a because it is already used as ~a.'
,
[
Ident
,
NeededKind
,
Kind
]
)
},
[
Message
].
[
'~a cannot be ~a because it is already used as ~a.'
-
[
Ident
,
NeededKind
,
Kind
]].
...
...
@@ -76,29 +69,24 @@ check_no_free_identifiers :-
->
true
;
throw
(
error
(
not_defined
(
FreeIdents
)
,
check_no_free_identifiers
))
throw
(
error
(
not_defined
(
FreeIdents
)))
).
prolog
:
error_
message
(
not_defined
(
FreeIdents
))
-->
prolog
:
message
(
error
(
not_defined
(
FreeIdents
))
)
-->
{
with_output_to
(
atom
(
Message
),
(
FreeIdents
=
[
FreeIdent
]
->
format
(
'~a is not defined.'
,
[
FreeIdent
])
;
write_successes
(
member
(
FreeIdent
,
FreeIdents
),
write
(
', '
),
write
(
FreeIdent
)
),
write
(
' are not defined.'
)
)
)
findall
(
'~a'
,
member
(
_
,
FreeIdents
),
As
),
atomic_list_concat
(
As
,
', '
,
Format
),
(
FreeIdents
=
[
_
]
->
Verb
=
'is'
;
Verb
=
'are'
),
atomic_list_concat
([
Format
,
Verb
,
'not defined'
],
' '
,
FullFormat
)
},
[
Message
].
[
FullFormat
-
FreeIdents
].
update_identifier_kinds
(
ModelId
)
:-
...
...
reaction_editor.pl
View file @
de7724e6
...
...
@@ -179,7 +179,7 @@ list_model_reactions :-
).
prolog
:
error_
message
(
not_a_reaction_model
)
-->
prolog
:
message
(
error
(
not_a_reaction_model
)
)
-->
[
'Not a reaction model'
].
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment