[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19894 [Metrics/CollecTor]: print message when no module is activated
#19894: print message when no module is activated
-------------------------------+---------------------------------
Reporter: iwakeh | Owner: iwakeh
Type: enhancement | Status: needs_review
Priority: Medium | Milestone: CollecTor 1.1.0
Component: Metrics/CollecTor | Version:
Severity: Minor | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------+---------------------------------
Comment (by karsten):
Hmm, is there a way to avoid printing the stack trace and instead print
just the error message and exit? I could imagine that many new users
would run into that case and conclude from the stack trace that the code
is broken. Example:
{{{
$ java -jar collector-1.1.0-dev.jar
Could not find config file. In the default configuration, we are not
configured to read data from any data source or write data to any data
sink. You need to change the configuration (collector.properties) and
provide at least one data source and one data sink. Refer to the manual
for more information.
Usage:
java -jar collector.jar [path/to/configFile]
$ java -jar collector-1.1.0-dev.jar
Exception in thread "main"
org.torproject.collector.conf.ConfigurationException: Nothing is
activated!
Please edit collector.properties. Exiting.
at
org.torproject.collector.conf.Configuration.anythingActivated(Configuration.java:91)
at
org.torproject.collector.conf.Configuration.setWatchableSourceAndLoad(Configuration.java:53)
at org.torproject.collector.Main.main(Main.java:73)
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19894#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs