~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-05 02:46:54 UTC
  • Revision ID: mbp@sourcefrog.net-20050505024654-eeb9582a23927c28
Better error for incorrect commands

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    try:
96
96
        cmd_class = globals()['cmd_' + cmd.replace('-', '_')]
97
97
    except KeyError:
98
 
        raise BzrError("unknown command %r" % cmd)
 
98
        raise BzrCommandError("unknown command %r" % cmd)
99
99
 
100
100
    return cmd, cmd_class
101
101