Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Use proper formatter placeholder for strings#98

Merged
cbrevik merged 1 commit intoidehub:masterfrom
dluksza:patch-1
Feb 7, 2018
Merged

Use proper formatter placeholder for strings#98
cbrevik merged 1 commit intoidehub:masterfrom
dluksza:patch-1

Conversation

@dluksza
Copy link
Contributor

@dluksza dluksza commented Feb 6, 2018

Java's String.format uses %s for string placeholders. %d is used for decimal numbers. This fixes IllegalFormatConversionException.

Fixes: #97

Java's String.format uses %s for string placeholders. %d is used for decimal numbers. This fixes IllegalFormatConversionException.

Fixes: #97
@cbrevik
Copy link
Member

cbrevik commented Feb 7, 2018

Thank you for this PR @dluksza! I'll merge and release a patch-version.

It's kind of interesting if you get this log-statement actually, because it shouldn't happen. Would be interesting to find out cases it does log.

@cbrevik cbrevik merged commit 5697bcf into idehub:master Feb 7, 2018
@cbrevik
Copy link
Member

cbrevik commented Feb 7, 2018

Published as 2.6.1

@dluksza
Copy link
Contributor Author

dluksza commented Feb 7, 2018

It's kind of interesting if you get this log-statement actually, because it shouldn't happen. Would be interesting to find out cases it does log.

I've only got it once on production so can't test it. My app is selling since mid of October and did over 50 in app purchases successfully. Only this one time this error happen.

BTW. How about adding callbacks so that those error can be handled on the JS side eg. be logged to firebase/crashlytics/mixpanel etc. this way we could get more information wether everything works as expected. Right now those error will be lost on production and nobody will know that they occurred.

@cbrevik
Copy link
Member

cbrevik commented Feb 7, 2018

Well that'd be nice I suppose, but what exactly should we call back to? The problem here is that the callbacks themselves does not exist in the cache. :)

I guess one way to do it would be to fire an event.

@dluksza
Copy link
Contributor Author

dluksza commented Feb 7, 2018

I was thinking about a callback within else branch, before or after Log.w() statement, so that we can track how often this happen on production. Right now all warnings (on production) are lost, since they are not propagated to $external_logging_system.

Of course the best would be to not have else branch at all and always succeed, but I assume that this not so obvious to achieve.

@dluksza dluksza deleted the patch-1 branch February 7, 2018 11:15
@lock
Copy link

lock bot commented Feb 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IllegalFormatConversionException: %d can't format java.lang.String arguments

2 participants