Table Of Contents

Previous topic

SyntaxSpecList

Next topic

EdErrorDialog

This Page

phoenix_title dev_tool

Editra Development Tools Tools and Utilities for debugging and helping with development of Editra.

Summary: Utility function for debugging the editor


class_hierarchy Inheritance Diagram

Inheritance diagram for module dev_tool

Inheritance diagram of dev_tool


function_summary Functions Summary

DEBUGP Prints debug messages and broadcasts them on the log message channel.
DecodeString Decode the given string to Unicode using the provided
ExceptionHook Handler for all unhandled exceptions

class_summary Classes Summary

EdErrorDialog Error reporter dialog
EdLogFile Transient log file object
LogMsg LogMsg is a container class for representing log messages. Converting

Functions



DEBUGP(statement)

Prints debug messages and broadcasts them on the log message channel. Subscribing a listener with any of the EDMSG_LOG_* types will recieve its messages from this method.

  1. Formatting
  • [object/module name][msg_type] message string
  1. Message Type:
  • [err] : Notes an exception or error condition (high priority)
  • [warn] : Notes a error that is not severe (medium priority)
  • [info] : General information message (normal priority)
  • [evt] : Event related message (normal priority)
Example:
>>> DEBUGP("[ed_main][err] File failed to open")
Parameters:statement – Should be a formatted string that starts with two identifier blocks. The first is used to indicate the source of the message and is used as the primary means of filtering. The second block is the type of message, this is used to indicate the priority of the message and is used as the secondary means of filtering.


DecodeString(string, encoding=None)

Decode the given string to Unicode using the provided encoding or the DEFAULT_ENCODING if None is provided.

Parameters:
  • string – string to decode
  • encoding – encoding to decode string with


ExceptionHook(exctype, value, trace)

Handler for all unhandled exceptions

Parameters:
  • exctype – Exception Type
  • value – Error Value
  • trace – Trace back info