New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin: make error message more friendly #2235

Merged
merged 4 commits into from Sep 1, 2017

Conversation

Projects
None yet
3 participants
@BusyJay
Contributor

BusyJay commented Aug 31, 2017

When tikv-server fails to start, it just print out the error without any context information, this may be confusing in some cases.

@BusyJay BusyJay requested review from overvenus and zhangjinpeng1987 Aug 31, 2017

@@ -431,7 +445,7 @@ fn main() {
overwrite_config_with_cmd_args(&mut config, &matches);
if let Err(e) = config.validate() {
eprintln!("{:?}", e);
eprintln!("invalid configuration: {:?}", e);

This comment has been minimized.

@overvenus

overvenus Aug 31, 2017

Member

fatal! too.

@overvenus

overvenus Aug 31, 2017

Member

fatal! too.

This comment has been minimized.

@BusyJay

BusyJay Aug 31, 2017

Contributor

No, log module is not initialized yet.

@BusyJay

BusyJay Aug 31, 2017

Contributor

No, log module is not initialized yet.

fn exit_with_msg(msg: String) -> ! {
error!("{}", msg);
process::exit(1)
macro_rules! fatal {

This comment has been minimized.

@overvenus

overvenus Aug 31, 2017

Member

I have no objection to the macro, since it is not exported. How about you @siddontang ?

@overvenus

overvenus Aug 31, 2017

Member

I have no objection to the macro, since it is not exported. How about you @siddontang ?

@siddontang

This comment has been minimized.

Show comment
Hide comment
@siddontang

siddontang Aug 31, 2017

Contributor

LGTM

Contributor

siddontang commented Aug 31, 2017

LGTM

@overvenus

lgtm

@BusyJay

This comment has been minimized.

Show comment
Hide comment
@BusyJay

BusyJay Aug 31, 2017

Contributor

PTAL

Contributor

BusyJay commented Aug 31, 2017

PTAL

@siddontang

This comment has been minimized.

Show comment
Hide comment
@siddontang

siddontang Aug 31, 2017

Contributor

LGTM

CI failed

Contributor

siddontang commented Aug 31, 2017

LGTM

CI failed

@BusyJay BusyJay merged commit c2bb426 into master Sep 1, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

@BusyJay BusyJay deleted the busyjay/friendly-error branch Sep 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment