Skip to content

Commit

Permalink
error refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aliokan committed Jan 31, 2019
1 parent ad25748 commit 6371d48
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/hex/control/guard/GuardUtil.hx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package hex.control.guard;

using hex.error.Error;

/**
* ...
* @author Francis Bourre
*/
class GuardUtil
{
/** @private */ function new() throw new hex.error.PrivateConstructorException();
/** @private */ function new() throw new PrivateConstructorException();

/**
* Approve guards
Expand Down
9 changes: 3 additions & 6 deletions src/hex/control/payload/PayloadUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ package hex.control.payload;

import hex.di.ClassName;
import hex.di.IBasicInjector;
import hex.error.PrivateConstructorException;

using hex.error.Error;

/**
* ...
* @author Francis Bourre
*/
class PayloadUtil
{
/** @private */
function new()
{
throw new PrivateConstructorException();
}
/** @private */ function new() throw new PrivateConstructorException();

/**
* Map payloads
Expand Down
2 changes: 1 addition & 1 deletion src/hex/control/trigger/Command.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import hex.control.async.AsyncResult;
import hex.control.command.ICommand;
import hex.di.IDependencyInjector;
import hex.di.IInjectorContainer;
import hex.error.VirtualMethodException;
import hex.log.ILogger;
import hex.module.IContextModule;

using tink.CoreApi;
using hex.error.Error;
/**
* ...
* @author Francis Bourre
Expand Down
3 changes: 2 additions & 1 deletion src/hex/control/trigger/CommandTriggerBuilder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import hex.util.MacroUtil;

using haxe.macro.Context;
using haxe.macro.Tools;
using hex.error.Error;

/**
* ...
Expand All @@ -24,7 +25,7 @@ class CommandTriggerBuilder
{
public static inline var MapAnnotation = "Map";

/** @private */ function new() throw new hex.error.PrivateConstructorException( "This class can't be instantiated." );
/** @private */ function new() throw new PrivateConstructorException();

macro static public function build() : Array<Field>
{
Expand Down
3 changes: 1 addition & 2 deletions src/hex/control/trigger/MacroCommand.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import hex.control.guard.GuardUtil;
import hex.control.payload.ExecutionPayload;
import hex.control.payload.PayloadUtil;
import hex.di.IDependencyInjector;
import hex.error.IllegalStateException;
import hex.error.VirtualMethodException;

using tink.CoreApi;
using hex.error.Error;

/**
* ...
Expand Down
3 changes: 2 additions & 1 deletion src/hex/module/ContextModule.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import hex.di.Injector;
import hex.di.MappingName;
import hex.di.provider.LoggerProvider;
import hex.di.util.InjectorUtil;
import hex.error.IllegalStateException;
import hex.log.ILogger;
import hex.log.LogManager;
import hex.module.IContextModule;

using hex.error.Error;

/**
* ...
* @author Francis Bourre
Expand Down
2 changes: 1 addition & 1 deletion test/hex/control/trigger/MacroCommandTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import hex.control.payload.PayloadUtil;
import hex.control.trigger.mock.*;
import hex.di.IDependencyInjector;
import hex.di.Injector;
import hex.error.IllegalStateException;
import hex.module.ContextModule;
import hex.module.IContextModule;
import hex.unittest.assertion.Assert;
import hex.unittest.runner.MethodRunner;

using tink.CoreApi;
using hex.error.Error;

/**
* ...
Expand Down
2 changes: 1 addition & 1 deletion test/hex/module/ContextModuleTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import hex.di.IBasicInjector;
import hex.di.IDependencyInjector;
import hex.di.Injector;
import hex.di.error.MissingMappingException;
import hex.error.IllegalStateException;
import hex.log.ILogger;
import hex.unittest.assertion.Assert;

using tink.CoreApi;
using hex.error.Error;
using hex.di.util.InjectorUtil;

/**
Expand Down

0 comments on commit 6371d48

Please sign in to comment.