Comments (1)
Note that I'm trying to inform these from the ideas on the Condition Failures Explained page from guava.
For BagProfile
I think it makes sense to use a checked exception - we already have ProfileValidationException
so that's a good place to start, though it is a checked exception. I would probably prefer to use a Result and have that provide information on errors over throwing an exception, but trying to keep this to as few changes as possible at the moment.
There are also other classes throwing unchecked exceptions:
BagConfig
- when creating, a
RuntimeException
is thrown if there is noBag-Info
section- Is this really an error? I can see why it might be enforced before, but this might be able to be removed
- when creating, a
RuntimeException
is thrown if the path to the yaml does not exist- The constructor could be updated to take a stream -- still likely exceptions that can occur (or
Reader
looks like it would be the best fit)
- The constructor could be updated to take a stream -- still likely exceptions that can occur (or
- when creating, a
RuntimeException
is thrown if the yaml cannot be parsedIllegalStateException
?
SerializationSupport
- when getting a
BagDeserializer
, aRuntimeException
is thrown if tika cannot detect the content type- Maybe allow the IOException to continue up the chain
- when getting a
BagDeserializer
, aRuntimeException
is thrown if theBagProfile
does not support the content type- Initially was thinking about using an
IllegalArgumentException
, but it's the file being read so maybe there's a better option
- Initially was thinking about using an
- when getting a
BagSerializer
, aRuntimeException
is thrown if theBagProfile
does not support the content type- same as above
BagWriter
- when registering a checksum, a
RuntimeException
is thrown if theMessageDigest
algorithm was not registered when creating theBagWriter
- Maybe
IllegalArgumentException
would be better, since the argument for the algorithm is invalid
- Maybe
from bagit-support.
Related Issues (20)
- Add payload manifest to the tag manifests
- Description text not loading from bag profile json
- Use BagItDigest in BagWriter checksum maps
- ProfileValidationUtil readInfo failure
- Improvements for BagWriter HOT 1
- BagProfile Improvements
- Ordering of fields in bagit.txt
- BagIt version
- Use BagIt-Profile-Identifier from version 1.0 of BTR Profile
- Add one or more tests that include UTF-8 characters HOT 1
- Checksum payload manifests after OutputStream is closed
- Test TarSerializer with large files
- Relax tar content type matching
- Separate handling for payload manifest and tag manifest algorithms
- Fix BeyondTheRepository Version
- Project Organization
- Default Bag Profile
- Maven build warnings
- Add code coverage reporting
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 bagit-support.