Skip to content

Commit

Permalink
完善错误处理
Browse files Browse the repository at this point in the history
  • Loading branch information
rungobier committed Jan 13, 2022
1 parent 8dc7ed9 commit df750fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zoomeye.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ fn check_apikey(apikey: &String) -> bool {
}

fn get_apikey() -> String {
fs::read_to_string(get_apikey_file()).except("Please use command:\n ct init APIKEY.");
let apikey = fs::read_to_string(get_apikey_file()).expect("\nPlease use command:\nct --init APIKEY.\n");
apikey
}

impl ZoomEye {
Expand Down

0 comments on commit df750fc

Please sign in to comment.