You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/11/06 02:51:41 UTC
android commit: CB-1809 `create` script should print out meaningful
error messages
Updated Branches:
refs/heads/master 69f11a29e -> ccdd2fd2c
CB-1809 `create` script should print out meaningful error messages
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/ccdd2fd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/ccdd2fd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/ccdd2fd2
Branch: refs/heads/master
Commit: ccdd2fd2ca86b355dd67466bb17ba00615ff0928
Parents: 69f11a2
Author: Anis Kadri <an...@gmail.com>
Authored: Mon Nov 5 17:51:32 2012 -0800
Committer: Anis Kadri <an...@gmail.com>
Committed: Mon Nov 5 17:51:32 2012 -0800
----------------------------------------------------------------------
bin/create | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/ccdd2fd2/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 71b912b..1bce739 100755
--- a/bin/create
+++ b/bin/create
@@ -66,12 +66,14 @@ function createAppInfoJar {
}
function on_error {
- echo "An error occurred. Deleting project..."
+ echo "An unexpected error occurred: $previous_command exited with $?"
+ echo "Deleting project..."
[ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
+ exit "$?"
}
function replace {
- local pattern=$1
+ local pattern=$1
local filename=$2
# Mac OS X requires -i argument
if [[ "$OSTYPE" =~ "darwin" ]]
@@ -84,6 +86,7 @@ function replace {
}
# we do not want the script to silently fail
+trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap on_error ERR
trap on_exit EXIT