mirror of
https://github.com/agersant/polaris
synced 2024-12-03 10:09:09 +00:00
No longer panic on startup/shutdown errors
This commit is contained in:
parent
2f49aa0e40
commit
c02b971984
1 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ fn run() -> Result<()> {
|
|||
|
||||
// Init index
|
||||
println!("Starting up index");
|
||||
let index = Arc::new(index::Index::new(vfs.clone(), &config.index).unwrap());
|
||||
let index = Arc::new(index::Index::new(vfs.clone(), &config.index)?);
|
||||
let index_ref = index.clone();
|
||||
std::thread::spawn(move || index_ref.run());
|
||||
|
||||
|
@ -100,7 +100,7 @@ fn run() -> Result<()> {
|
|||
let api_handler;
|
||||
{
|
||||
let mut collection = collection::Collection::new(vfs, index);
|
||||
collection.load_config(&config).unwrap();
|
||||
collection.load_config(&config)?;
|
||||
let collection = Arc::new(collection);
|
||||
api_handler = api::get_api_handler(collection);
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ fn run() -> Result<()> {
|
|||
ui::run();
|
||||
|
||||
println!("Shutting down server");
|
||||
server.close().unwrap();
|
||||
server.close()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue