From 8174b683cb914ea34cb8eb98221dd3e7d24704e1 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 25 Jul 2015 21:49:26 +0200 Subject: [PATCH] pharo: Do not use >>% format but the pharp command --- callagent/MGCPCommands.st | 9 +++++++-- callagent/MGCPEndpoint.st | 4 ++-- callagent/MGCPTransaction.st | 20 ++++++++++---------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/callagent/MGCPCommands.st b/callagent/MGCPCommands.st index 3664f12..46036c8 100644 --- a/callagent/MGCPCommands.st +++ b/callagent/MGCPCommands.st @@ -29,7 +29,7 @@ Object subclass: MGCPCommandBase [ self allSubclassesDo: [:each | each verb = verb ifTrue: [^each parseFromDict: nodes]]. - ^self error: 'Unknown command verb "%1"' % {verb}. + ^self error: ('Unknown command verb "<1s>"' expandMacrosWith: verb). ] MGCPCommandBase class >> parseFromDict: nodes [ @@ -123,7 +123,12 @@ Object subclass: MGCPCommandBase [ "write the header" out - nextPutAll: '%1 %2 %3 MGCP 1.0' % {self class verb. transaction. endp}; + nextPutAll: self class verb; + nextPutAll: ' '; + nextPutAll: transaction asString; + nextPutAll: ' '; + nextPutAll: endp; + nextPutAll: ' MGCP 1.0'; cr; nl. "write the parameters" diff --git a/callagent/MGCPEndpoint.st b/callagent/MGCPEndpoint.st index d28615a..5babf60 100644 --- a/callagent/MGCPEndpoint.st +++ b/callagent/MGCPEndpoint.st @@ -87,8 +87,8 @@ Object subclass: MGCPEndpoint [ requireState: aState [ state = aState ifFalse: [ - ^ self error: 'MGCPEndpoint(%1) not %2.' - % {self endpointName. aState}. + ^ self error: ('MGCPEndpoint(<1p>) not <2p>.' + expandMacrosWithArguments: {self endpointName. aState}). ]. ] diff --git a/callagent/MGCPTransaction.st b/callagent/MGCPTransaction.st index 3ecb3f4..479e739 100644 --- a/callagent/MGCPTransaction.st +++ b/callagent/MGCPTransaction.st @@ -179,13 +179,13 @@ MGCPTransactionBase subclass: MGCPTransaction [ response: aRes [ "Handle response but only once" state = self class stateStarted ifFalse: [ - ^ self logError: 'Transaction(ID:%1 verb:%2) already terminated' - % {id. command class verb} area: #mgcp. + ^ self logError: ('Transaction(ID:<1p> verb:<2s>) already terminated' + expandMacrosWithArguments: {id. command class verb}) area: #mgcp. ]. "Remember things for the future" - self logNotice: 'Transaction(ID:%1 verb:%2) got a response.' - % {id. command class verb} area: #mgcp. + self logNotice: ('Transaction(ID:<1p> verb:<2s>) got a response.' + expandMacrosWithArguments: {id. command class verb}) area: #mgcp. state := self class stateFinished. self completed. @@ -197,16 +197,16 @@ MGCPTransactionBase subclass: MGCPTransaction [ transactionRemoved [ - self logNotice: 'Transaction(ID:%1 verb:%2) is finished. %3' - % {id. command class verb. DateTime now} area: #mgcp. + self logNotice: ('Transaction(ID:<1p> verb:<2s>) is finished. <3p>' + expandMacrosWithArguments: {id. command class verb. DateTime now}) area: #mgcp. self callagent removeTransactionInternal: self. ] transactionExpired [ - self logNotice: 'Transaction(ID:%1 verb:%2) expired. %3' - % {id. command class verb. DateTime now} area: #mgcp. + self logNotice: ('Transaction(ID:<1p> verb:<2s>) expired. <3p>' + expandMacrosWithArguments: {id. command class verb. DateTime now}) area: #mgcp. state := self class stateFinished. self stopRetransmitTimer. @@ -217,8 +217,8 @@ MGCPTransactionBase subclass: MGCPTransaction [ transactionRetransmit [ - self logNotice: 'Transaction(ID:%1 verb:%2) retransmit.' - % {id. command class verb} area: #mgcp. + self logNotice: ('Transaction(ID:<1p> verb:<2s>) retransmit.' + expandMacrosWithArguments: {id. command class verb}) area: #mgcp. self sendData. ] ]