diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-02-18 17:39:41 +0330 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2023-02-28 15:52:24 +0330 |
commit | 0c28fd41ed513dce59b96067c96b1cb6c0aacc2e (patch) | |
tree | e78cb0b0252ba9efde9396cddcbf571843100aa0 /Userland/Shell/Shell.h | |
parent | e403dbabfa112e5cd432595ef99982eba5120ef3 (diff) | |
download | serenity-0c28fd41ed513dce59b96067c96b1cb6c0aacc2e.zip |
Shell: Convert all immediately convertible fallible functions to ErrorOr
Diffstat (limited to 'Userland/Shell/Shell.h')
-rw-r--r-- | Userland/Shell/Shell.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Shell/Shell.h b/Userland/Shell/Shell.h index dd6a22502c..9d01900823 100644 --- a/Userland/Shell/Shell.h +++ b/Userland/Shell/Shell.h @@ -165,15 +165,15 @@ public: static DeprecatedString expand_tilde(StringView expression); static Vector<DeprecatedString> expand_globs(StringView path, StringView base); static Vector<DeprecatedString> expand_globs(Vector<StringView> path_segments, StringView base); - Vector<AST::Command> expand_aliases(Vector<AST::Command>); + ErrorOr<Vector<AST::Command>> expand_aliases(Vector<AST::Command>); DeprecatedString resolve_path(DeprecatedString) const; DeprecatedString resolve_alias(StringView) const; static bool has_history_event(StringView); - RefPtr<AST::Value const> get_argument(size_t) const; - RefPtr<AST::Value const> lookup_local_variable(StringView) const; - DeprecatedString local_variable_or(StringView, DeprecatedString const&) const; + ErrorOr<RefPtr<AST::Value const>> get_argument(size_t) const; + ErrorOr<RefPtr<AST::Value const>> lookup_local_variable(StringView) const; + ErrorOr<DeprecatedString> local_variable_or(StringView, DeprecatedString const&) const; void set_local_variable(DeprecatedString const&, RefPtr<AST::Value>, bool only_in_current_frame = false); void unset_local_variable(StringView, bool only_in_current_frame = false); @@ -276,7 +276,7 @@ public: No }; - void highlight(Line::Editor&) const; + ErrorOr<void> highlight(Line::Editor&) const; Vector<Line::CompletionSuggestion> complete(); Vector<Line::CompletionSuggestion> complete(StringView); Vector<Line::CompletionSuggestion> complete_program_name(StringView, size_t offset, EscapeMode = EscapeMode::Bareword); |