Skip to content

Commit 72f72db

Browse files
authored
Merge pull request #72 from DoclerLabs/develop
prepare 0.34.0
2 parents 07983e6 + 0bad1be commit 72f72db

File tree

50 files changed

+292
-2715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+292
-2715
lines changed

src/hex/di/Injector.hx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ class Injector
132132
return null;
133133
}
134134
}
135-
136-
inline function _getClassDescription( type : Class<Dynamic> )
137-
{
138-
return Reflect.getProperty( type, "__INJECTION" );
139-
}
140135

141136
public function instantiateUnmapped<T>( type : Class<T> ) : T
142137
{
@@ -149,6 +144,10 @@ class Injector
149144
{
150145
instance = ( cast type ).__ac( this.getInstanceWithClassName );
151146
}
147+
catch ( e : MissingMappingException )
148+
{
149+
throw( e );
150+
}
152151
catch( e : Dynamic )
153152
{
154153
instance = Type.createInstance( type, [] );
@@ -161,9 +160,13 @@ class Injector
161160
this._applyInjection( instance, type );
162161
}
163162
}
163+
catch ( e : MissingMappingException )
164+
{
165+
throw( e );
166+
}
164167
catch ( e : Dynamic )
165168
{
166-
169+
//Do nothing
167170
}
168171

169172
return instance;
@@ -250,23 +253,11 @@ class Injector
250253

251254
public function destroyInstance( instance : Dynamic ) : Void
252255
{
253-
//#if php
254256
if ( this._managedObjects.containsKey( instance ) )
255257
{
256258
this._managedObjects.remove( instance );
257259
instance.__ap();
258260
}
259-
/*#else
260-
try
261-
{
262-
this._managedObjects.remove( instance );
263-
instance.__ap();
264-
}
265-
catch ( e : Dynamic )
266-
{
267-
268-
}
269-
#end*/
270261
}
271262

272263
public function map<T>( type : Class<T>, name : String = '' ) : InjectionMapping<T>

0 commit comments

Comments
 (0)