We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49507c1 commit 90ee17dCopy full SHA for 90ee17d
1 file changed
bin/cppman
@@ -115,8 +115,12 @@ def main():
115
sys.exit(0)
116
117
if options.keyword:
118
- cm.find(options.keyword)
119
- sys.exit(0)
+ try:
+ cm.find(options.keyword)
120
+ sys.exit(0)
121
+ except RuntimeError as e:
122
+ print(e, file=sys.stderr)
123
+ sys.exit(16)
124
125
if options.source:
126
if options.source not in config.SOURCES:
@@ -154,11 +158,11 @@ def main():
154
158
sys.stderr.write('What manual page do you want?\n')
155
159
sys.exit(1)
156
160
157
- keyword = cm.fuzzy_find(args[0])
- if not keyword:
- sys.exit(1)
-
161
try:
162
+ keyword = cm.fuzzy_find(args[0])
163
+ if not keyword:
164
+ sys.exit(1)
165
+
166
pid = cm.man(keyword)
167
except RuntimeError as e:
168
print(e, file=sys.stderr)
0 commit comments