equal
deleted
inserted
replaced
544 return nil, err; |
544 return nil, err; |
545 end |
545 end |
546 return true; |
546 return true; |
547 end |
547 end |
548 |
548 |
|
549 function startup.init_errors() |
|
550 require "util.error".configure(config.get("*", "error_library")); |
|
551 end |
|
552 |
549 function startup.make_host(hostname) |
553 function startup.make_host(hostname) |
550 return { |
554 return { |
551 type = "local", |
555 type = "local", |
552 events = prosody.events, |
556 events = prosody.events, |
553 modules = {}, |
557 modules = {}, |
575 startup.init_global_state(); |
579 startup.init_global_state(); |
576 startup.read_config(); |
580 startup.read_config(); |
577 startup.force_console_logging(); |
581 startup.force_console_logging(); |
578 startup.init_logging(); |
582 startup.init_logging(); |
579 startup.init_gc(); |
583 startup.init_gc(); |
|
584 startup.init_errors(); |
580 startup.setup_plugindir(); |
585 startup.setup_plugindir(); |
581 -- startup.setup_plugin_install_path(); |
586 -- startup.setup_plugin_install_path(); |
582 startup.setup_datadir(); |
587 startup.setup_datadir(); |
583 startup.chdir(); |
588 startup.chdir(); |
584 startup.read_version(); |
589 startup.read_version(); |
598 startup.parse_args(); |
603 startup.parse_args(); |
599 startup.init_global_state(); |
604 startup.init_global_state(); |
600 startup.read_config(); |
605 startup.read_config(); |
601 startup.init_logging(); |
606 startup.init_logging(); |
602 startup.init_gc(); |
607 startup.init_gc(); |
|
608 startup.init_errors(); |
603 startup.sanity_check(); |
609 startup.sanity_check(); |
604 startup.sandbox_require(); |
610 startup.sandbox_require(); |
605 startup.set_function_metatable(); |
611 startup.set_function_metatable(); |
606 startup.check_dependencies(); |
612 startup.check_dependencies(); |
607 startup.load_libraries(); |
613 startup.load_libraries(); |