QScintilla/Shell.py

changeset 4366
9445c7cb991f
parent 4021
195a471c327b
child 4479
fd9ceecf5a65
equal deleted inserted replaced
4365:d97f2e05ae1b 4366:9445c7cb991f
158 dbs.clientBanner.connect(self.__writeBanner) 158 dbs.clientBanner.connect(self.__writeBanner)
159 dbs.clientCompletionList.connect(self.__showCompletions) 159 dbs.clientCompletionList.connect(self.__showCompletions)
160 dbs.clientCapabilities.connect(self.__clientCapabilities) 160 dbs.clientCapabilities.connect(self.__clientCapabilities)
161 dbs.clientException.connect(self.__clientException) 161 dbs.clientException.connect(self.__clientException)
162 dbs.clientSyntaxError.connect(self.__clientSyntaxError) 162 dbs.clientSyntaxError.connect(self.__clientSyntaxError)
163 dbs.clientSignal.connect(self.__clientSignal)
163 self.dbs = dbs 164 self.dbs = dbs
164 165
165 # Initialize instance variables. 166 # Initialize instance variables.
166 self.__initialise() 167 self.__initialise()
167 self.prline = 0 168 self.prline = 0
707 self.__write( 708 self.__write(
708 self.tr('Syntax error "{1}" in file {0} at line {2},' 709 self.tr('Syntax error "{1}" in file {0} at line {2},'
709 ' character {3}.\n') 710 ' character {3}.\n')
710 .format(filename, message, lineNo, characterNo) 711 .format(filename, message, lineNo, characterNo)
711 ) 712 )
713
714 def __clientSignal(self, message, filename, lineNo, funcName, funcArgs):
715 """
716 Private method to handle a signal generated on the client side.
717
718 @param message message of the syntax error
719 @type str
720 @param filename translated filename of the syntax error position
721 @type str
722 @param lineNo line number of the syntax error position
723 @type int
724 @param funcName name of the function causing the signal
725 @type str
726 @param funcArgs function arguments
727 @type str
728 """
729 self.__clientError()
730
731 self.__write(
732 self.tr("""Signal "{0}" generated in file {1} at line {2}.\n"""
733 """Function: {3}({4})""")
734 .format(message, filename, lineNo, funcName, funcArgs)
735 )
712 736
713 def __clientError(self): 737 def __clientError(self):
714 """ 738 """
715 Private method to handle an error in the client. 739 Private method to handle an error in the client.
716 """ 740 """

eric ide

mercurial