Comments (8)
Closing out as PR #19 resolves.
from applecommander.
This is blocking a pet project of mine. I intend to pursue this matter.
How do you guys wants me to handle this? As a recursive loop is detected, what Exception (and what text) you want me to throw?
post edit
A similar problem also affects the ProDOS FormattedDisk
implementation.
I have a working solution for this, currently under testing, implemented as follows:
PROPOSAL
- infra code
- DiskException
- a new Root Exception for
com.webcodepro.applecommander.storage
. - DiskFullException extends it
- a new DiskCorruptException extends it
- Public interfaces throws it
- code throws the Exception that closely describes the situation.
- Client side can check the exception's subclass by hand on the few situations where it's needed.
- a new Root Exception for
- public methods that throws IOException catches the DIskException and throw a new IOException with it.
- public methods that don't throws anything, now throws DiskException
- protected, private and default methods just throws DiskException, even if they throws IOException already.
- DiskException
- UI
- methods that throws IOException, catches DiskException and throw a new IOException with it.
- methods than don't throw anything intercepts the DiskException and try to do something smart.
- Some FIXME remarks are added where I think the user show be notified somehow.
Implemented result
013b - Congo Bongo.dsk
File Name : /Users/lisias/code/net.lisias/net.lisias.retro/JAVA/data/a2/disks.bad/013b - Congo Bongo.dsk
com.webcodepro.applecommander.storage.DiskCorruptException: Recursive Directory structure detected.
at com.webcodepro.applecommander.storage.os.dos33.DosFormatDisk.getFiles(DosFormatDisk.java:154)
at examples.a2cmdr.test.show_disk(test.java:34)
at examples.a2cmdr.test.main(test.java:19)
from applecommander.
That's awesome! Looking forward to this pull request, I like this initial approach. I've been busy and just wanted to let you know I appreciate the finding and the effort!
from applecommander.
On the "back end", things worked very well. I can parse all the asimov's disk images with success. The DiskException is being thrown when appropriated.
But the UI is kaput. I really messed up something (perhaps on my runtime environment, I didn't managed to find time to check what's happening yet) - no disk image's content is being rendered on the Panel. The thing doesn't blows up, but doesn't works correctly neither.
I had forked this repo and created a branch for this issue. Is someone is willing to give me a hand on the UI, you're welcome. :-)
Branch: https://github.com/Lisias/AppleCommander/tree/issues/18
from applecommander.
Holy Crud!!! I was trying to make a screenshot with the problem, and the thing suddenly works! :-)
It's my running environment for sure. Something just fixed itself on the last eclipse update. =D
I will spend some hours trying to break the thing to see what happens in the next few days. If everything goes fine, I'll do a push request. :-)
from applecommander.
Pull Request at
from applecommander.
I updated the pull request, with the proposed fixes (including coding conventions) and some more tweaks to make further work easier to cope with. Also added UI support for the new warnings needed.
Please advise.
from applecommander.
About that First Aid tool. Should I open a issue for that to document the idea? It will be some time until I have the time to do that, but it would be nice to have it documented so I (or anyone else that like the job) can execute it without reverse-engineering the wheel. :-)
from applecommander.
Related Issues (20)
- Question: supporting dd/img type disk image format HOT 2
- File viewer shows character codes instead of actual characters
- targetPath (--directory parameter) is completely ignored by acx cp HOT 1
- Move boot capability from acx into the API and introduce to GUI/ac-cli
- Fix ProDOS date widths for column listings HOT 1
- Add disassembly view HOT 1
- DiskFullException when there is plenty of space on disk image HOT 2
- Not an AppleSingle file - magic number does not match. HOT 3
- Rename master branch to main
- Add block/sector hex dump/disassembly capability (acx only?)
- Add a find duplicate files function.
- How to get at AntTask.class inside a springboot-packaged jar? HOT 5
- Doesnt' work on my Apple MacMini M1 HOT 3
- AppleSingle issues (files without data fork, real name, modification date) HOT 10
- Mac homebrew ruby formula needs to distinguish url based on cpu architecture HOT 1
- Question: CLI -convert function
- Run AppleCommander on Win10, Java 8? HOT 2
- Crash when resizing main window HOT 2
- DiskUnrecognizedException when using acx on .dsk file HOT 2
- acx -a=$1234 does not work correctly on Linux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applecommander.