Skip to content

Commit

Permalink
remove not neccessary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Dec 7, 2023
1 parent 202f909 commit 180f5ab
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 37 deletions.
8 changes: 2 additions & 6 deletions DXFeedFramework/Events/Market/Candles/CandleAlignment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public enum CandleAlignment: DXCandleAlignment, CaseIterable {
attributeKey,
other.toString())
}
} catch let error {
print(error)
}
} catch let error { }
return symbol
}

Expand Down Expand Up @@ -148,9 +146,7 @@ extension CandleAlignment: ICandleSymbolProperty {
CandleAlignment.attributeKey,
self.toString())
return res
} catch let error {
print(error)
}
} catch let error { }
}
return symbol
}
Expand Down
4 changes: 1 addition & 3 deletions DXFeedFramework/Events/Market/Candles/CandlePeriod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public class CandlePeriod {
attribute,
other.toString())
}
} catch let error {
print(error)
}
} catch let error { }
return symbol
}

Expand Down
4 changes: 1 addition & 3 deletions DXFeedFramework/Events/Market/Candles/CandlePrice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ public enum CandlePrice: DXCandlePrice, CaseIterable {
if attribute != other.toString() {
return try MarketEventSymbols.changeAttributeStringByKey(symbol, attributeKey, other.toString())
}
} catch let error {
print(error)
}
} catch let error { }
return symbol
}
/// Gets candle price of the given candle symbol string.
Expand Down
4 changes: 1 addition & 3 deletions DXFeedFramework/Events/Market/Candles/CandlePriceLevel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public class CandlePriceLevel {
attributeKey,
other.toString())
}
} catch let error {
print(error)
}
} catch let error { }
return symbol
}

Expand Down
4 changes: 1 addition & 3 deletions DXFeedFramework/Events/Market/Candles/CandleSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ public enum CandleSession: DXCandleSession, CaseIterable {
if other == false || other == nil {
_ = MarketEventSymbols.removeAttributeStringByKey(symbol, attributeKey)
}
} catch let error {
print(error)
}
} catch let error { }
return symbol
}
/// Gets candle session of the given candle symbol string.
Expand Down
2 changes: 1 addition & 1 deletion DXFeedFramework/Events/Market/Extra/IIndexedEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public protocol IIndexedEvent: IEventType {
/// Gets or sets transactional event flags.
var eventFlags: Int32 { get set }
/// Gets or sets unique per-symbol index of this event.
var index: Long { get set }
var index: Long { get }
}

/// Just wrapper around event flags.
Expand Down
18 changes: 10 additions & 8 deletions DXFeedFramework/Events/Market/Extra/OrderBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ public class OrderBase: MarketEvent, IIndexedEvent, CustomStringConvertible {

public var eventFlags: Int32 = 0

public var index: Long = 0 {
didSet {
if index < 0 {
index = 0
print("Negative index for \(self)")
}
}
}
public private(set) var index: Long = 0

public var eventSymbol: String

Expand Down Expand Up @@ -163,6 +156,15 @@ tradeSize: \(tradeSize)
}

extension OrderBase {
/// Gets or sets unique per-symbol index of this event.
/// - Throws: ``ArgumentException/exception(_:)``
public func setIndex(_ value: Long) throws {
if index < 0 {
throw ArgumentException.exception("Negative index: \(index)")
}
self.index = value
}

/// Gets a value indicating whether this order has some size
public func hsaSize() -> Bool {
return size != 0 && !size.isNaN
Expand Down
2 changes: 0 additions & 2 deletions DXFeedFramework/Native/Endpoint/NativeEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class NativeEndpoint {
let nativeFeed = try ErrorCheck.nativeCall(thread, dxfg_DXEndpoint_getFeed(thread, self.endpoint))
return NativeFeed(feed: nativeFeed)
} catch {
print(error)
return nil
}
}()
Expand All @@ -54,7 +53,6 @@ class NativeEndpoint {
let nativeFeed = try ErrorCheck.nativeCall(thread, dxfg_DXEndpoint_getPublisher(thread, self.endpoint))
return NativePublisher(publisher: nativeFeed)
} catch {
print(error)
return nil
}
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension AnalyticOrder {

self.eventTime = native.order_base.order_base.market_event.event_time
self.eventFlags = native.order_base.order_base.event_flags
self.index = native.order_base.order_base.index
try? self.setIndex(native.order_base.order_base.index)
self.timeSequence = native.order_base.order_base.time_sequence
self.timeNanoPart = native.order_base.order_base.time_nano_part
self.actionTime = native.order_base.order_base.action_time
Expand Down
2 changes: 1 addition & 1 deletion DXFeedFramework/Native/Events/Markets/Order+Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension Order {

self.eventTime = native.order_base.market_event.event_time
self.eventFlags = native.order_base.event_flags
self.index = native.order_base.index
try? self.setIndex(native.order_base.index)
self.timeSequence = native.order_base.time_sequence
self.timeNanoPart = native.order_base.time_nano_part
self.actionTime = native.order_base.action_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension SpreadOrder {

self.eventTime = native.order_base.market_event.event_time
self.eventFlags = native.order_base.event_flags
self.index = native.order_base.index
try? self.setIndex(native.order_base.index)
self.timeSequence = native.order_base.time_sequence
self.timeNanoPart = native.order_base.time_nano_part
self.actionTime = native.order_base.action_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public class NativeInstrumentProfileCollector {
do {
let profile = try iterator.next()
profiles.append(profile)
} catch {
print("NativeInstrumentProfileCollector: exception \(error)")
}
} catch { }
}
listener.value?.instrumentProfilesUpdated(profiles)
}
Expand Down
4 changes: 2 additions & 2 deletions Samples/QdsTools/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<action selector="runCommand:" destination="BYZ-38-t0r" eventType="touchUpInside" id="T7e-41-GN6"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="TimeAndSale" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Eca-2i-C1B">
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="TimeAndSale" borderStyle="roundedRect" placeholder="Records" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Eca-2i-C1B">
<rect key="frame" x="10" y="113" width="309.33333333333331" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="dxscheme.wide=false,monitoring.stat=10s" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gwh-pe-8Au">
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="dxscheme.wide=false,monitoring.stat=10s" borderStyle="roundedRect" placeholder="Properties" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gwh-pe-8Au">
<rect key="frame" x="10" y="157" width="309.33333333333331" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
Expand Down

0 comments on commit 180f5ab

Please sign in to comment.