Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sweng-group-15
yjs
Commits
808a07d2
Commit
808a07d2
authored
9 years ago
by
Kevin Jahns
Browse files
Options
Downloads
Patches
Plain Diff
added some error messages
parent
afbe81a6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/y.js
+14
-6
14 additions, 6 deletions
src/y.js
with
14 additions
and
6 deletions
src/y.js
+
14
−
6
View file @
808a07d2
...
...
@@ -92,13 +92,21 @@ function Y (opts/* :YOptions */) /* :Promise<YConfig> */ {
}
Y
.
sourceDir
=
opts
.
sourceDir
return
Y
.
requestModules
(
modules
).
then
(
function
()
{
return
new
Promise
(
function
(
resolve
)
{
var
yconfig
=
new
YConfig
(
opts
)
yconfig
.
db
.
whenUserIdSet
(
function
()
{
yconfig
.
init
(
function
()
{
resolve
(
yconfig
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
opts
==
null
)
reject
(
'
An options object is expected!
'
)
else
if
(
opts
.
connector
==
null
)
reject
(
'
You must specify a connector! (missing connector property)
'
)
else
if
(
opts
.
connector
.
name
==
null
)
reject
(
'
You must specify connector name! (missing connector.name property)
'
)
else
if
(
opts
.
db
==
null
)
reject
(
'
You must specify a database! (missing db property)
'
)
else
if
(
opts
.
connector
.
name
==
null
)
reject
(
'
You must specify db name! (missing db.name property)
'
)
else
if
(
opts
.
share
==
null
)
reject
(
'
You must specify a set of shared types!
'
)
else
{
var
yconfig
=
new
YConfig
(
opts
)
yconfig
.
db
.
whenUserIdSet
(
function
()
{
yconfig
.
init
(
function
()
{
resolve
(
yconfig
)
})
})
}
)
}
})
})
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment