Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
c55bcc21
Commit
c55bcc21
authored
Dec 23, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated Error messaging in CaptureSession
parent
67009dde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
Sources/CaptureSession.swift
+25
-5
Sources/MaterialTableViewCell.swift
+1
-1
No files found.
Sources/CaptureSession.swift
View file @
c55bcc21
...
...
@@ -264,7 +264,11 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
error
=
e
}
}
else
{
error
=
NSError
(
domain
:
"[MaterialKit Error: Unsupported focusMode.]"
,
code
:
0
,
userInfo
:
nil
)
var
userInfo
:
Dictionary
<
String
,
AnyObject
>
=
Dictionary
<
String
,
AnyObject
>
()
userInfo
[
NSLocalizedDescriptionKey
]
=
"[MaterialKit Error: Unsupported focusMode.]"
userInfo
[
NSLocalizedFailureReasonErrorKey
]
=
"[MaterialKit Error: Unsupported focusMode.]"
error
=
NSError
(
domain
:
"io.materialkit.CaptureView"
,
code
:
1111
,
userInfo
:
userInfo
)
userInfo
[
NSUnderlyingErrorKey
]
=
error
}
if
let
e
:
NSError
=
error
{
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
...
...
@@ -291,7 +295,11 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
error
=
e
}
}
else
{
error
=
NSError
(
domain
:
"[MaterialKit Error: Unsupported flashMode.]"
,
code
:
0
,
userInfo
:
nil
)
var
userInfo
:
Dictionary
<
String
,
AnyObject
>
=
Dictionary
<
String
,
AnyObject
>
()
userInfo
[
NSLocalizedDescriptionKey
]
=
"[MaterialKit Error: Unsupported flashMode.]"
userInfo
[
NSLocalizedFailureReasonErrorKey
]
=
"[MaterialKit Error: Unsupported flashMode.]"
error
=
NSError
(
domain
:
"io.materialkit.CaptureView"
,
code
:
2222
,
userInfo
:
userInfo
)
userInfo
[
NSUnderlyingErrorKey
]
=
error
}
if
let
e
:
NSError
=
error
{
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
...
...
@@ -318,7 +326,11 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
error
=
e
}
}
else
{
error
=
NSError
(
domain
:
"[MaterialKit Error: Unsupported torchMode.]"
,
code
:
0
,
userInfo
:
nil
)
var
userInfo
:
Dictionary
<
String
,
AnyObject
>
=
Dictionary
<
String
,
AnyObject
>
()
userInfo
[
NSLocalizedDescriptionKey
]
=
"[MaterialKit Error: Unsupported torchMode.]"
userInfo
[
NSLocalizedFailureReasonErrorKey
]
=
"[MaterialKit Error: Unsupported torchMode.]"
error
=
NSError
(
domain
:
"io.materialkit.CaptureView"
,
code
:
3333
,
userInfo
:
userInfo
)
userInfo
[
NSUnderlyingErrorKey
]
=
error
}
if
let
e
:
NSError
=
error
{
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
...
...
@@ -460,7 +472,11 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
error
=
e
}
}
else
{
error
=
NSError
(
domain
:
"[MaterialKit Error: Unsupported focusAtPoint.]"
,
code
:
0
,
userInfo
:
nil
)
var
userInfo
:
Dictionary
<
String
,
AnyObject
>
=
Dictionary
<
String
,
AnyObject
>
()
userInfo
[
NSLocalizedDescriptionKey
]
=
"[MaterialKit Error: Unsupported focusAtPoint.]"
userInfo
[
NSLocalizedFailureReasonErrorKey
]
=
"[MaterialKit Error: Unsupported focusAtPoint.]"
error
=
NSError
(
domain
:
"io.materialkit.CaptureView"
,
code
:
4444
,
userInfo
:
userInfo
)
userInfo
[
NSUnderlyingErrorKey
]
=
error
}
if
let
e
:
NSError
=
error
{
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
...
...
@@ -486,7 +502,11 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
error
=
e
}
}
else
{
error
=
NSError
(
domain
:
"[MaterialKit Error: Unsupported exposeAtPoint.]"
,
code
:
0
,
userInfo
:
nil
)
var
userInfo
:
Dictionary
<
String
,
AnyObject
>
=
Dictionary
<
String
,
AnyObject
>
()
userInfo
[
NSLocalizedDescriptionKey
]
=
"[MaterialKit Error: Unsupported exposeAtPoint.]"
userInfo
[
NSLocalizedFailureReasonErrorKey
]
=
"[MaterialKit Error: Unsupported exposeAtPoint.]"
error
=
NSError
(
domain
:
"io.materialkit.CaptureView"
,
code
:
5555
,
userInfo
:
userInfo
)
userInfo
[
NSUnderlyingErrorKey
]
=
error
}
if
let
e
:
NSError
=
error
{
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
...
...
Sources/MaterialTableViewCell.swift
View file @
c55bcc21
//
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io>
and other CosmicMind contributors
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment