Handle errors when creating defaults dirs properly
If we can't create the defaults directory it's a Very Bad Sign™, and
we should bail out immediately. It probably means the user is running
from a directory they don't have write access to, and if we can't
write defaults then the client isn't going to work very well at all.
Previous behaviour tried to carry on and failed a precondition check
and died even more painfully.
Change-Id: Id72fb63c014939ac384ee03b9eb0f14baf6e18fe
Fixes-Issue: CLIENT-488
Reviewed-on: http://gerrit.dmdirc.com/3335
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
If we pass required = false then the config manager will happily
return null if it encounters a disabled optional setting. We
don't accept null so that's a bit daft.
Change-Id: I37934ba15877b8c0caf188b5f80e3353c8555134
Fixes-Issue: CLIENT-491
Reviewed-on: http://gerrit.dmdirc.com/3333
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Move error reporting logic from ProgramError into a new ErrorReporter.
Also add methods for reporting on mode alias issues (currently unused).
Issue: CLIENT-476
Change-Id: I23a25e6cc594003cf2afee7cfda714a9082acc3b
Reviewed-on: http://gerrit.dmdirc.com/3332
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Only send errors to Sentry. Pretend ever error is a shiny new one.
We should remove the fixed status at some point.
Change-Id: I1ae79eca54a417182cdf1ecb560b59c1674be549
Fixes-Issue: CLIENT-475
Reviewed-on: http://gerrit.dmdirc.com/3329
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
The current implementation has its own low priority thread pool.
We're already executing it in a thread ourselves, so just send
them right away.
I think this causes us to not log fatal errors to Sentry sometimes.
Change-Id: Ib4a105711e71be254e73b9aad1b244fc59fc79a4
Reviewed-on: http://gerrit.dmdirc.com/3328
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
If callers specify an implementation then it's the return type they're
concerned about, not the class providing it.
Change-Id: I9d2aa23de47373323cabb362042995f822cd9311
Reviewed-on: http://gerrit.dmdirc.com/3284
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
These don't make any sense at all. I think I was on something.
Change-Id: I494a2956eb5b1812cbe7bcc29507316ab36758af
Reviewed-on: http://gerrit.dmdirc.com/3245
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Add a new ServiceLocator and legacy implementation
ServiceLocator allows plugins to provide services really
conveniently.
The LegacyServiceLocator is backed by the PluginManager, and checks
for any compatible @Exported methods in loaded plugins. It will not
try to load any plugins that aren't currently loaded.
Issue: CLIENT-445
Change-Id: I61274dbb0b910509e0e170600e473eb23234bb6f
Reviewed-on: http://gerrit.dmdirc.com/3244
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This is the first phase of migrating to an event bus based system.
See the migration doc here: http://s.dmdirc.com/actions-eventbus
The CLIENT_OPENED event is now triggered exclusively through the
event bus (and still works).
Issue: CLIENT-448
Change-Id: I3fb41a51a7c767558c72921241c9aa12fcae65d4
Reviewed-on: http://gerrit.dmdirc.com/3233
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Previously /mode #channel failed with an exception trying to
get the arguments. Now it works as expected.
Also fix an issue with silence chars not being propagated to
channel command - /.topic #channel will now work silently.
Change-Id: Ifa314b0daf81a30003d5879b9484e759668bc763
Fixes-Issue: CLIENT-455
Reviewed-on: http://gerrit.dmdirc.com/3208
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This happens if everything goes OK, but either the constructor
can't be injected or the constructor lobs an exception.
Both of these are some kind of app error, rather than user error.
Change-Id: I90ba613b9ecbbad0bf64df2b325667a0fa0076d1
Fixes-Issue: CLIENT-444
Reviewed-on: http://gerrit.dmdirc.com/3180
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
This allows plugin modules to define their own directory types
while still using the @DirectoryType qualifier, rather than having
to define a new qualifier.
Change-Id: I4809c94303a10a9e412615be4f8d10a086ace92b
Reviewed-on: http://gerrit.dmdirc.com/3176
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
- Don't grab an IdentityManager, instead pass one in as soon as it's created.
- Pass config into ProgramError instead of pulling from a singleton.
- Ensure errors created before the IdentityManager is ready are sent/saved
per the user's config.
Change-Id: I4793f2a030d2d341ce8f04db47ae3614a1de076c
Reviewed-on: http://gerrit.dmdirc.com/3129
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager