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

someClass basicNew printString fails for around 10.000 classes #5250

Open
kasperosterbye opened this issue Nov 27, 2019 · 2 comments
Open

someClass basicNew printString fails for around 10.000 classes #5250

kasperosterbye opened this issue Nov 27, 2019 · 2 comments

Comments

@kasperosterbye
Copy link
Contributor

@kasperosterbye kasperosterbye commented Nov 27, 2019

Is that a problem?

Object allSubclasses select: [ :c |  
    [(c basicNew) printString. false ] 
        on: Exception 
        do: [ true ] ].

The problem has an easy fix, changing the #printStringLimitedTo:using: method in 'Object' to have an exception handling part , perhaps returning 'an uninitialized nameOfClass` (or something better please).

Perhaps also some of the other implementations of printString need to be fixed, but not sure.

@kasperosterbye

This comment has been minimized.

Copy link
Contributor Author

@kasperosterbye kasperosterbye commented Nov 27, 2019

I encountered the problem when debugging initialization code

@VincentBlondeau

This comment has been minimized.

Copy link
Contributor

@VincentBlondeau VincentBlondeau commented Nov 27, 2019

That's a good idea! You could even set up a test that check there is no error risen.

kasperosterbye added a commit to kasperosterbye/pharo that referenced this issue Dec 2, 2019
Introduce a robustness to the general #printString. All non-failing printString calls continue to work. The fix is in particularly nice when debugging initialization code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.