Skip to content
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

Update DefaultBotSession.java #893

Closed
wants to merge 1 commit into from
Closed

Conversation

slavino
Copy link
Contributor

@slavino slavino commented Apr 7, 2021

@codecov-io
Copy link

Codecov Report

Merging #893 (fd8bc5e) into master (4882040) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #893      +/-   ##
============================================
- Coverage     18.34%   18.34%   -0.01%     
  Complexity      742      742              
============================================
  Files           260      260              
  Lines          7168     7170       +2     
  Branches        757      757              
============================================
  Hits           1315     1315              
- Misses         5750     5752       +2     
  Partials        103      103              
Impacted Files Coverage Δ Complexity Δ
...legrambots/updatesreceivers/DefaultBotSession.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4882040...fd8bc5e. Read the comment docs.

@rubenlagus
Copy link
Owner

@slavino What about overriding the actual getMessage method form the TelegramApiRequestException (or any other exception in the API to something like (yes, looks like initially I override ToString incorrectly:

        @Override
        public String getMessage() {
            if (super.getApiResponse() == null) {
                return super.getMessage();
            } else if (super.getErrorCode() == null) {
                return super.getMessage() + ": " + super.getApiResponse();
            } else {
                return super.getMessage() + ": [" + super.getErrorCode() + "] " + super.getApiResponse();
            }
        }

@slavino
Copy link
Contributor Author

slavino commented Apr 16, 2021

Sure, go ahead ;)

@slavino slavino closed this Apr 16, 2021
@slavino slavino deleted the patch-1 branch April 16, 2021 06:37
slavino added a commit to slavino/TelegramBots that referenced this pull request Apr 19, 2021
Chase22 pushed a commit to Chase22/TelegramBots that referenced this pull request Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants